@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=DM+Sans:wght@400;500&display=swap');

:root {
  --primary: #F8BBD0;
  --secondary: #F48FB1;
  --accent: #EC407A;
  --light: #880E4F;
  --bg: #FCE4EC;
  --white: #FFFFFF;
  --card-bg: #FFFFFF;
  --text-primary: #1B3409;
  --text-secondary: #4A6A2F;
  --text-muted: #7A9A5A;
  --border: #C5E1A5;
  --border-light: #DCEDC8;
  --danger: #C62828;
  --danger-bg: #FFEBEE;
  --success: #2E7D32;
  --success-bg: #E8F5E9;
  --warning-bg: #FFF8E1;
  --warning-text: #F57F17;
  --shadow-sm: 0 1px 3px rgba(51, 105, 30, 0.08);
  --shadow-md: 0 4px 12px rgba(51, 105, 30, 0.1);
  --shadow-lg: 0 8px 24px rgba(51, 105, 30, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

::selection {
  background: var(--light);
  color: var(--primary);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Nunito', sans-serif;
}

/* ===== APP SHELL ===== */
.app-shell {
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(255,255,255,0.05) 0%, transparent 40%);
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
}

.header-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.25rem;
  animation: bounceIn 0.6s ease-out;
}

.header-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.header-subtitle {
  font-size: 0.875rem;
  color: var(--border-light);
  margin-top: 0.25rem;
  font-weight: 400;
}

/* ===== TAB BAR ===== */
.tab-bar {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
  position: relative;
  font-size: 0.8rem;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  transition: width 0.25s ease;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  width: 60%;
}

.tab-icon {
  font-size: 1.25rem;
}

.tab-label {
  font-size: 0.75rem;
}

/* ===== MAIN ===== */
.app-main {
  flex: 1;
  padding: 1.25rem 1rem;
}

/* ===== FOOTER ===== */
.app-footer {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-light);
}

/* ===== LOADING ===== */
.loading-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-card {
  height: 64px;
  background: linear-gradient(110deg, var(--border-light) 30%, var(--white) 50%, var(--border-light) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.badge {
  background: var(--border-light);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-family: 'Nunito', sans-serif;
}

/* ===== FORMS ===== */
.add-form {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.input-group {
  flex: 1;
  min-width: 140px;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-family: 'Nunito', sans-serif;
}

.input-field {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(104, 159, 56, 0.15);
}

.input-field::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.input-sm {
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: var(--white);
  box-shadow: 0 2px 8px rgba(51, 105, 30, 0.2);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(51, 105, 30, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--border-light);
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--border-light);
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.btn-icon:hover {
  background: var(--border-light);
}

.btn-icon.btn-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-large {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.add-btn {
  flex-shrink: 0;
}

/* ===== PARTICIPANT LIST ===== */
.participant-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.participant-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  animation: fadeInUp 0.35s ease-out both;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.participant-card:hover {
  box-shadow: var(--shadow-md);
}

.card-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--light));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.participant-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.participant-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.participant-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.edit-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.edit-row .input-field {
  flex: 1;
  min-width: 100px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.empty-state.small {
  padding: 1.5rem 1rem;
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
}

.empty-state.small .empty-icon {
  font-size: 2rem;
}

.empty-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.empty-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== INFO BANNER ===== */
.info-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--success);
  animation: fadeInUp 0.3s ease-out;
}

.info-banner.warning {
  background: var(--warning-bg);
  border-left-color: var(--warning-text);
  color: var(--warning-text);
}

.info-banner.success {
  background: var(--success-bg);
  border-left-color: var(--success);
  color: var(--success);
}

.info-banner p {
  line-height: 1.4;
}

/* ===== ASSIGNMENTS ===== */
.assignments-section {
  display: flex;
  flex-direction: column;
}

.draw-area {
  margin-bottom: 1.25rem;
}

.draw-controls {
  text-align: center;
}

.draw-btn {
  min-width: 200px;
}

.draw-btn.drawing {
  pointer-events: none;
}

.draw-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.reveal-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.assignment-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.assignment-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease-out both;
  user-select: none;
}

.assignment-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.assignment-card.revealed {
  border-color: var(--light);
  background: linear-gradient(135deg, var(--white) 0%, rgba(241, 248, 233, 0.5) 100%);
}

.assignment-giver,
.assignment-receiver {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.assignment-receiver {
  justify-content: flex-end;
}

.giver-avatar,
.receiver-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.giver-avatar {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
}

.receiver-avatar {
  background: linear-gradient(135deg, var(--accent), var(--light));
  color: var(--white);
}

.giver-name,
.receiver-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.assignment-arrow {
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.assignment-card.revealed .assignment-arrow {
  transform: scale(1.2);
}

.secret-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== WISHLISTS ===== */
.wishlists-section {
  display: flex;
  flex-direction: column;
}

.person-selector {
  margin-bottom: 1.25rem;
}

.person-selector label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-family: 'Nunito', sans-serif;
}

.person-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.person-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 25px;
  background: var(--white);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.825rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.person-chip:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.person-chip.active {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(104, 159, 56, 0.3);
}

.chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.person-chip.active .chip-avatar {
  background: rgba(255,255,255,0.3);
  color: var(--white);
}

.chip-name {
  white-space: nowrap;
}

.chip-count {
  background: var(--border-light);
  color: var(--secondary);
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-chip.active .chip-count {
  background: rgba(255,255,255,0.3);
  color: var(--white);
}

.wishlist-detail {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.3s ease-out;
}

.wishlist-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.wishlist-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.wishlist-add-form .btn {
  align-self: flex-start;
}

.wishlist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wishlist-card {
  animation: fadeInUp 0.3s ease-out both;
}

.wishlist-card-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.wishlist-card-content:hover {
  background: var(--border-light);
}

.wishlist-item-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.wishlist-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wishlist-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.wishlist-item-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.08);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .app-header {
    padding: 1.5rem 1rem 1.25rem;
  }

  .header-title {
    font-size: 1.4rem;
  }

  .header-icon {
    font-size: 2rem;
  }

  .form-row {
    flex-direction: column;
  }

  .add-btn {
    width: 100%;
  }

  .assignment-card {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 0.85rem;
  }

  .assignment-giver,
  .assignment-receiver {
    justify-content: center;
  }

  .reveal-controls {
    flex-direction: column;
  }

  .reveal-controls .btn {
    width: 100%;
  }

  .edit-row {
    flex-direction: column;
  }

  .edit-row .input-field {
    width: 100%;
  }

  .edit-row .btn {
    width: 100%;
  }

  .wishlist-add-form .btn {
    width: 100%;
    align-self: stretch;
  }
}


<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Secret Santa! Let's start by adding participants to your gift exchange group.", "view": "user", "highlight_selector": ".tab-btn:first-child", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "Enter each person's name and optional email, then click Add to build your group.", "view": "user", "highlight_selector": ".add-form", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Once you have at least 3 people, you'll see a green banner suggesting you draw names.", "view": "user", "highlight_selector": ".info-banner", "wait_for": "tap_to_continue"},
  {"step": 4, "narration": "Head to the Draw tab to randomly assign Secret Santa pairs.", "view": "user", "highlight_selector": ".tab-btn:nth-child(2)", "wait_for": "user_interaction"},
  {"step": 5, "narration": "Click Draw Names to randomly pair everyone. Nobody will get themselves!", "view": "user", "highlight_selector": ".draw-btn", "wait_for": "user_interaction"},
  {"step": 6, "narration": "Each assignment is hidden by default. Tap a card to privately reveal who that person is buying for.", "view": "user", "highlight_selector": ".assignment-card", "wait_for": "user_interaction"},
  {"step": 7, "narration": "Now let's add wishlists! Go to the Wishlists tab.", "view": "user", "highlight_selector": ".tab-btn:nth-child(3)", "wait_for": "user_interaction"},
  {"step": 8, "narration": "Select a person, then add gift ideas with optional notes about size, color, or links.", "view": "user", "highlight_selector": ".person-chips", "wait_for": "user_interaction"},
  {"step": 9, "narration": "Your Secret Santa is all set! All data syncs across your devices automatically. Happy gifting! 🎁", "view": "user", "highlight_selector": ".app-header", "wait_for": "tap_to_continue"}
]
-->

.auth-gate-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.auth-gate-icon {
  font-size: 2rem;
}

.auth-gate-card h3 {
  color: var(--primary);
}

.auth-gate-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), var(--light));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  flex-shrink: 0;
}

.auth-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.auth-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.budget-tracker {
  border: 1px solid var(--border-light);
  background: var(--success-bg);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.budget-tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.budget-tracker-header h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  color: var(--primary);
}

.budget-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.budget-status.purchased {
  background: rgba(46, 125, 50, 0.12);
  color: var(--success);
}

.budget-status.pending {
  background: rgba(198, 40, 40, 0.1);
  color: var(--danger);
}

.budget-tracker-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.budget-purchased-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.budget-purchased-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.budget-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.budget-summary strong {
  color: var(--primary);
}

.budget-saving {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chip-status {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.28);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
}

.person-chip .chip-status {
  margin-left: 0.1rem;
}

@media (max-width: 640px) {
  .budget-tracker-header,
  .budget-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

.countdown-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--warning-bg), #fffdf3);
  border: 1px solid rgba(245, 127, 23, 0.18);
  color: var(--warning-text);
  font-size: 0.9rem;
}

.countdown-label {
  font-weight: 600;
}

.countdown-time {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  color: var(--primary);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .countdown-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.assignment-email-section { margin-top: 1.5rem; }
.assignment-email-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.25rem; }
.assignment-email-summary { font-weight: 600; }
.status-list { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.status-list li { margin-bottom: 0.25rem; }

.chat-input-group { flex: 1; min-width: 220px; }
.chat-thread { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }
.chat-message { display: flex; flex-direction: column; gap: 0.3rem; }
.chat-meta { font-size: 0.72rem; color: var(--text-muted); font-family: 'Nunito', sans-serif; }
.chat-bubble { display: inline-block; max-width: 100%; padding: 0.7rem 0.85rem; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--border-light); color: var(--text-primary); box-shadow: var(--shadow-sm); }
