/* ==============================================================================
   COOKED - The Social Culinary Platform & Recipe Box
   CSS Design System & Theme Variables
   ============================================================================== */

:root {
  /* Brand Color Palette - Upscale Culinary & Cast-Iron Herb */
  --primary: #235d43;          /* Deep Culinary Herb / Rosemary */
  --primary-hover: #184431;
  --primary-light: rgba(35, 93, 67, 0.12);
  --secondary: #d97706;        /* Golden Saffron / Toasted Amber */
  --secondary-hover: #b45309;
  --secondary-light: rgba(217, 119, 6, 0.12);
  --success: #16a34a;          /* Fresh Basil */
  --success-light: rgba(22, 163, 74, 0.12);
  --warning: #f59e0b;
  --danger: #dc2626;           /* Paprika Red */
  --danger-light: rgba(220, 38, 38, 0.12);
  --info: #0284c7;

  /* Light Theme (Artisan Linen & Warm Parchment) */
  --bg-body: #f8f6f0;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1ede4;
  --bg-hover: #e9e4d8;
  --border-color: #e2dcd0;
  --border-subtle: #eae5da;
  --text-main: #1c221e;
  --text-muted: #5e6862;
  --text-light: #8e9892;
  --shadow-sm: 0 1px 3px rgba(28, 34, 30, 0.05);
  --shadow-md: 0 4px 14px rgba(28, 34, 30, 0.08);
  --shadow-lg: 0 12px 32px rgba(28, 34, 30, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Dark Theme (Cast Iron Charcoal & Smoked Slate) */
  --bg-body: #0f1311;
  --bg-surface: #171c19;
  --bg-surface-subtle: #202723;
  --bg-hover: #2a332e;
  --border-color: #2f3a34;
  --border-subtle: #242c27;
  --text-main: #f3f5f4;
  --text-muted: #a6b2ac;
  --text-light: #707d76;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.8);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Typography Helpers */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

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

a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
}

/* ==============================================================================
   APP LAYOUT & CONTAINER
   ============================================================================== */

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOP NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  height: 64px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  cursor: pointer;
  letter-spacing: -0.5px;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--primary);
}

.search-bar-wrap {
  position: relative;
  width: 280px;
}

.search-bar-wrap input {
  width: 100%;
  padding: 0.45rem 0.85rem 0.45rem 2.2rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  outline: none;
  transition: var(--transition);
}

.search-bar-wrap input:focus {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-bar-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 380px;
  max-width: 92vw;
  max-height: 480px;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  padding: 0.35rem 0;
}

.search-section-header {
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.35rem;
}

.search-section-header:first-child {
  margin-top: 0;
  border-top: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-main);
}

.search-result-item:hover, .search-result-item:focus {
  background-color: var(--bg-surface-subtle);
  text-decoration: none;
}

.search-result-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--bg-surface-subtle);
  flex-shrink: 0;
}

.search-result-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

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

.search-result-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty-state {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* MAIN 3-COLUMN LAYOUT */
.main-layout {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  gap: 1.5rem;
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  flex: 1;
}

.main-layout.layout-wide {
  grid-template-columns: 240px 1fr;
  max-width: 1560px;
}

.main-layout.layout-wide .sidebar-right {
  display: none;
}

/* LEFT SIDEBAR NAVIGATION */
.sidebar-left {
  position: sticky;
  top: 80px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.nav-item:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-main);
  text-decoration: none;
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.5rem 0;
}

.sidebar-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding: 0.25rem 1rem;
  font-weight: 700;
}

/* CENTER CONTENT AREA */
.content-area {
  min-width: 0;
}

/* RIGHT SIDEBAR (Trending / Featured Chefs / Kitchen Tips) */
.sidebar-right {
  position: sticky;
  top: 80px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==============================================================================
   BUTTONS & FORM ELEMENTS
   ============================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--bg-surface-subtle);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
  text-decoration: none;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 0.45rem;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-main);
}

/* Form Controls */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* BADGES & CHIPS */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-secondary { background: var(--bg-surface-subtle); color: var(--text-muted); }

/* ==============================================================================
   COMMUNITY FEED & POST CARDS
   ============================================================================== */

.create-post-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.create-post-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.avatar-sm {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--bg-surface-subtle);
}

.avatar-md {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.feed-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.filter-chip {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.post-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.post-author-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
}

.author-username {
  font-size: 0.8rem;
  color: var(--text-light);
}

.post-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.post-content {
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  white-space: pre-line;
}

.post-image-wrap {
  margin: 0 -1.25rem 1rem -1.25rem;
  max-height: 480px;
  overflow: hidden;
  background-color: var(--bg-surface-subtle);
  cursor: pointer;
  position: relative;
}

.post-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-image-wrap:hover img {
  transform: scale(1.02);
}

/* Attached Recipe Preview in Post */
.post-attached-recipe {
  display: flex;
  gap: 0.85rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.post-attached-recipe:hover {
  border-color: var(--primary);
}

.post-attached-recipe img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.post-action-btn:hover {
  color: var(--primary);
}

.post-action-btn.liked {
  color: var(--danger);
}

.post-action-btn.liked svg {
  fill: var(--danger);
}

/* ==============================================================================
   COMMENTS DRAWER & THREADS
   ============================================================================== */

.comments-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.comment-item {
  display: flex;
  gap: 0.65rem;
}

.comment-item.reply {
  margin-left: 2.5rem;
  border-left: 2px solid var(--border-color);
  padding-left: 0.65rem;
}

.comment-bubble {
  background-color: var(--bg-surface-subtle);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  flex: 1;
}

.comment-author {
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.comment-text {
  font-size: 0.88rem;
  line-height: 1.4;
}

.comment-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

.comment-meta span {
  cursor: pointer;
}

.comment-meta span:hover {
  color: var(--primary);
}

.comment-input-wrap {
  display: flex;
  gap: 0.5rem;
}

/* ==============================================================================
   RECIPE BOX & RECIPE CARDS
   ============================================================================== */

.recipe-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.recipe-tabs {
  display: flex;
  gap: 0.5rem;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.recipe-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition);
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.recipe-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background-color: var(--bg-surface-subtle);
}

.recipe-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.recipe-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  line-height: 1.3;
}

.recipe-card-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.recipe-card-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ==============================================================================
   RECIPE DETAIL & COOKING MODE
   ============================================================================== */

.recipe-detail-header {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.recipe-hero-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.recipe-hero-content {
  padding: 1.5rem;
}

.recipe-meta-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.meta-badge-box {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 80px;
}

.meta-badge-box .label {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
}

.meta-badge-box .value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.recipe-interactive-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.ingredients-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  height: fit-content;
}

.servings-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface-subtle);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.ingredient-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}

.instructions-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.instruction-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-check {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.step-check input[type="checkbox"] {
  margin-top: 0.3rem;
  accent-color: var(--primary);
}

.step-completed .step-instruction {
  text-decoration: line-through;
  color: var(--text-light);
}

/* ==============================================================================
   KITCHEN MEAL PLANNER - SPACIOUS & UNCLUTTERED WORKSTATION
   ============================================================================== */

.planner-header-wrap {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.planner-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.planner-nav-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.planner-view-toggle {
  display: flex;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.planner-view-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.planner-view-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Day Filter Tabs Bar */
.planner-day-filter-bar {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.planner-day-filter-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.planner-day-filter-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.planner-day-filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Weekly Stats & Summary Bar */
.planner-stats-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.85rem;
  font-size: 0.84rem;
}

.planner-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
  background-color: var(--bg-surface-subtle);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.planner-stat-pill strong {
  color: var(--primary);
  font-weight: 700;
}

/* 1. BOARD VIEW: Spacious Horizontal 7-Day Board */
.planner-board-wrapper {
  overflow-x: auto;
  padding-bottom: 1.25rem;
  margin-top: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.planner-board-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(220px, 1fr));
  gap: 1rem;
  min-width: 100%;
}

.planner-day-col {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  min-height: 420px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.planner-day-col.is-today {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 1px var(--primary-light), var(--shadow-md);
}

.planner-day-header {
  padding: 0.9rem 1rem;
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.planner-day-col.is-today .planner-day-header {
  background-color: var(--primary-light);
}

.planner-day-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.planner-day-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.planner-today-badge {
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.planner-day-slots {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

/* Rich Planned Meal Card */
.planner-meal-card {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  position: relative;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.planner-meal-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.planner-meal-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.planner-meal-tag-breakfast { color: #d97706; }
.planner-meal-tag-lunch { color: #2563eb; }
.planner-meal-tag-dinner { color: var(--primary); }
.planner-meal-tag-snack { color: #8b5cf6; }

.planner-card-body {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.planner-card-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.planner-card-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

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

.planner-card-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.planner-card-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.planner-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.planner-card-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border-left: 2px solid var(--accent);
  line-height: 1.35;
}

.planner-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border-color);
}

.planner-cook-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid transparent;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.planner-cook-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Empty Day State (No Visual Clutter) */
.planner-empty-day-state {
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  background-color: transparent;
}

.planner-empty-day-state:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.planner-add-dish-btn {
  width: 100%;
  padding: 0.55rem;
  border: 1.5px dashed var(--border-color);
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  margin-top: auto;
}

.planner-add-dish-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

/* 2. AGENDA VIEW: Deep Dive List */
.planner-agenda-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.planner-agenda-day-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.planner-agenda-day-card.is-today {
  border: 2px solid var(--primary);
}

.planner-agenda-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.planner-agenda-meals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.planner-meal-tag-breakfast { color: #d97706; }
.planner-meal-tag-lunch { color: #2563eb; }
.planner-meal-tag-dinner { color: var(--primary); }
.planner-meal-tag-snack { color: #8b5cf6; }

.planner-card-body {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.planner-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.planner-card-thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

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

.planner-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.planner-card-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.planner-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.planner-card-notes {
  font-size: 0.73rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  border-left: 2px solid var(--accent);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.planner-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color);
}

.planner-cook-btn {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid transparent;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.planner-cook-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Empty Slot Placeholder */
.planner-empty-slot {
  background-color: transparent;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.planner-empty-slot:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.planner-empty-slot-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

/* 2. AGENDA VIEW: Deep Dive List */
.planner-agenda-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.planner-agenda-day-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.planner-agenda-day-card.is-today {
  border: 2px solid var(--primary);
}

.planner-agenda-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.planner-agenda-meals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

/* Visual Recipe Picker in Planner Modal */
.planner-recipe-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-subtle);
}

.planner-picker-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  transition: all 0.15s ease;
}

.planner-picker-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.planner-picker-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary);
}

.planner-picker-thumb {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.planner-picker-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Weekly Grocery Checklist Styles */
.grocery-category-group {
  margin-bottom: 1.25rem;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
}

.grocery-category-header {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grocery-item-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.86rem;
}

.grocery-item-row:last-child {
  border-bottom: none;
}

.grocery-item-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.grocery-item-row.checked span {
  text-decoration: line-through;
  color: var(--text-light);
}

.grocery-item-source {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ==============================================================================
   MODALS & LIGHTBOX
   ============================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-dialog.modal-lg {
  max-width: 820px;
}

.modal-backdrop.show .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-body {
  padding: 1.4rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--border-color);
}

/* Fullscreen Media Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox-overlay.show {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==============================================================================
   TOAST NOTIFICATIONS
   ============================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 260px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid var(--info); }

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

/* ==============================================================================
   PASSWORD STRENGTH METER & SECURITY REQUIREMENTS
   ============================================================================== */

.password-feedback-container {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.password-strength-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.password-strength-bar {
  flex-grow: 1;
  height: 5px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  min-width: 140px;
  text-align: right;
}

.password-reqs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.2rem;
}

.password-req-item {
  font-size: 0.75rem;
  color: var(--text-light);
  transition: var(--transition);
}

.password-req-item.met {
  color: var(--success);
  font-weight: 600;
}

/* ==============================================================================
   KITCHEN STATIONS (Sub-Communities) STYLING
   ============================================================================== */

.badge-station {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(35, 93, 67, 0.25);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-station:hover {
  background: var(--primary);
  color: #ffffff;
}

[data-theme="dark"] .badge-station {
  background: rgba(35, 93, 67, 0.3);
  color: #6ee7b7;
  border-color: rgba(35, 93, 67, 0.5);
}

.stations-directory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.stations-badge-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

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

@keyframes pulseAnim {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.stations-header-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.stations-header-text p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 580px;
}

.stations-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.station-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.station-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.station-card-banner {
  height: 110px;
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.station-card-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-md);
}

.station-card-pill {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.station-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.station-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.station-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex-grow: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.station-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.station-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-station-clockin {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  transition: var(--transition);
}

.btn-station-clockin:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-station-active {
  background: var(--success) !important;
  border: 1.5px solid var(--success) !important;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
}

.btn-station-active:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}

/* Station Hero */
.station-hero {
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-md);
}

.station-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.station-hero-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .station-hero-icon {
  background: var(--bg-surface);
}

.station-slug-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.station-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.station-hero-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  max-width: 680px;
}

.station-hero-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}

.station-hero-stats {
  display: flex;
  gap: 1.5rem;
}

.hero-stat-box {
  display: flex;
  flex-direction: column;
}

.hero-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Station Workstation 2-Column Grid */
.station-workstation-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.station-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.station-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.station-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.station-sidebar-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.station-rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.station-rules-list li {
  line-height: 1.45;
  padding-left: 0.25rem;
}

.station-brigade-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.brigade-member-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.brigade-member-item:hover {
  background: var(--bg-surface-subtle);
}

.brigade-member-info {
  display: flex;
  flex-direction: column;
}

.brigade-member-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brigade-member-user {
  font-size: 0.72rem;
  color: var(--text-light);
}

.lead-badge {
  font-size: 0.68rem;
  background: var(--secondary-light);
  color: var(--secondary);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.empty-stations-state,
.empty-station-feed {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

@media (max-width: 900px) {
  .station-workstation-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ============================================================================== */

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 200px 1fr;
  }
  .sidebar-right {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
    padding: 1rem 0.75rem 5rem 0.75rem;
  }
  .sidebar-left {
    display: none;
  }
  .search-bar-wrap {
    width: 160px;
  }
  .recipe-interactive-grid {
    grid-template-columns: 1fr;
  }
  .planner-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile Bottom Navigation */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    z-index: 99;
    justify-content: space-around;
    align-items: center;
  }
}

.mobile-bottom-nav {
  display: none;
}

/* ==============================================================================
   PROFILE AVATAR UPLOAD & LINK COMPONENT
   ============================================================================== */
.avatar-edit-section {
  margin-bottom: 1.25rem;
}

.avatar-edit-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

@media (max-width: 480px) {
  .avatar-edit-box {
    flex-direction: column;
    text-align: center;
  }
}

.avatar-edit-preview-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: 2.5px solid var(--primary);
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.avatar-edit-preview-wrap:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(224, 86, 36, 0.3);
}

.avatar-edit-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: #ffffff;
  font-size: 1.3rem;
}

.avatar-edit-preview-wrap:hover .avatar-upload-overlay {
  opacity: 1;
}

.avatar-edit-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  width: 100%;
}

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

.avatar-uploading-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
}

.avatar-url-direct-row {
  width: 100%;
  margin-top: 0.25rem;
}

.avatar-sublabel {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

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

.btn-outline.text-danger:hover {
  background: rgba(220, 53, 69, 0.1);
}

.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin-avatar 0.8s linear infinite;
  display: inline-block;
}

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

/* ==============================================================================
   IN-APP NOTIFICATIONS & ACTIVITY INBOX
   ============================================================================== */

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

.notif-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.notif-bell-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  line-height: 1;
}

.notif-badge.pulse {
  animation: notif-pulse-anim 1.8s infinite;
}

@keyframes notif-pulse-anim {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: -10px;
  width: 360px;
  max-width: 90vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
}

.notif-dropdown-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.notif-dropdown-body {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  text-decoration: none;
  color: var(--text-main);
  position: relative;
}

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

.notif-item:hover {
  background: var(--bg-hover);
}

.notif-item.unread {
  background: var(--primary-light);
}

.notif-item.unread:hover {
  background: rgba(35, 93, 67, 0.18);
}

.notif-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.notif-type-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  border: 1.5px solid var(--bg-surface);
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-message {
  font-size: 0.84rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--text-light);
  display: block;
}

.notif-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
}

/* ==============================================================================
   STAR RATING PICKER & REVIEW RATINGS
   ============================================================================== */

.star-rating-picker {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.star-btn {
  font-size: 2rem;
  color: var(--border-color);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
  line-height: 1;
}

.star-btn:hover {
  transform: scale(1.15);
}

.star-btn.active,
.star-btn.hover-active {
  color: #f59e0b;
}

.recipe-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .recipe-rating-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

/* ==============================================================================
   "I MADE THIS!" DISH REMAKES & COMMUNITY REVIEWS
   ============================================================================== */

.remakes-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.remakes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.remakes-stats-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.remakes-rating-large {
  font-size: 2rem;
  font-weight: 800;
  color: #d97706;
  line-height: 1;
}

.remakes-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
}

.remake-card {
  min-width: 200px;
  max-width: 220px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

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

.remake-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

.remake-card-body {
  padding: 0.65rem 0.75rem;
}

.reviews-list-container {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.review-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  gap: 0.85rem;
}

.review-item-main {
  flex: 1;
  min-width: 0;
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.review-item-stars {
  color: #f59e0b;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.review-item-notes {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-main);
  margin-top: 0.35rem;
}

/* ==============================================================================
   STATION LEADERBOARD
   ============================================================================== */

.station-leaderboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

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

.leaderboard-item:hover {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.leaderboard-rank-badge {
  width: 24px;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-light);
}

.leaderboard-rank-badge.rank-1 { color: #f59e0b; font-size: 1.1rem; }
.leaderboard-rank-badge.rank-2 { color: #94a3b8; font-size: 1rem; }
.leaderboard-rank-badge.rank-3 { color: #b45309; font-size: 0.95rem; }

.leaderboard-stats {
  margin-left: auto;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================================================
   DIRECT MESSAGES (KITCHEN WHISPERS)
   ============================================================================== */

.dm-nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.dm-nav-btn {
  position: relative;
}

.dm-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-main);
  animation: pulseBadge 2s infinite;
}

.dm-drawer-dialog {
  max-width: 820px;
  width: 95%;
  height: 85vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
}

.dm-drawer-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100% - 60px);
}

.dm-conversations-sidebar {
  width: 280px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
}

/* DM Tab Navigation */
.dm-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.dm-tab-btn {
  flex: 1;
  padding: 0.65rem 0.5rem;
  background: transparent;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.dm-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.dm-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

.dm-tab-count {
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  min-width: 16px;
  text-align: center;
}

/* Request Action Banners */
.dm-request-banner {
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dm-request-banner-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
}

.dm-request-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.dm-pending-notice {
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border-top: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.8rem;
  color: #d97706;
  text-align: center;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.dm-friend-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
}

.dm-search-bar-wrap {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.dm-search-bar-wrap input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
}

.dm-conversations-list {
  flex: 1;
  overflow-y: auto;
}

.dm-convo-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  align-items: center;
}

.dm-convo-item:hover {
  background-color: var(--bg-hover);
}

.dm-convo-item.active {
  background-color: var(--primary-light);
  border-left: 3px solid var(--primary);
}

.dm-convo-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}

.dm-convo-time {
  font-size: 0.7rem;
  color: var(--text-light);
}

.dm-convo-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-unread-pill {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.dm-active-thread-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
}

.dm-empty-thread-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  gap: 0.5rem;
}

.dm-thread-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dm-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dm-bubble-row {
  display: flex;
  width: 100%;
}

.dm-bubble-row.mine {
  justify-content: flex-end;
}

.dm-bubble-row.theirs {
  justify-content: flex-start;
}

.dm-bubble {
  max-width: 75%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.4;
  position: relative;
}

.dm-bubble.mine {
  background-color: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.dm-bubble.theirs {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 2px;
}

.dm-bubble-text {
  word-break: break-word;
}

.dm-bubble-time {
  display: block;
  font-size: 0.65rem;
  margin-top: 0.25rem;
  opacity: 0.75;
  text-align: right;
}

.dm-attached-card {
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
  cursor: pointer;
}

.dm-bubble.mine .dm-attached-card {
  background: rgba(255, 255, 255, 0.15);
}

.dm-attached-card img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.dm-input-area {
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.dm-input-area input {
  flex: 1;
}

/* ==============================================================================
   CULINARY MULTI-REACTIONS & PICKER
   ============================================================================== */

.reaction-wrapper {
  position: relative;
  display: inline-block;
}

.rx-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rx-main-btn.reacted {
  color: var(--primary);
  font-weight: 700;
}

.reaction-popover {
  position: absolute;
  bottom: 120%;
  left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.5rem;
  display: none;
  gap: 0.4rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: popIn 0.15s ease-out;
}

.reaction-popover.show {
  display: flex;
}

.rx-option {
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease;
  padding: 0.2rem 0.25rem;
  border-radius: 50%;
  user-select: none;
}

.rx-option:hover {
  transform: scale(1.35);
  background-color: var(--bg-hover);
}

.rx-option.active {
  background-color: var(--primary-light);
  transform: scale(1.2);
}

.reaction-pills-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.reaction-pill:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.reaction-pill.active {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 700;
  color: var(--primary);
}

/* ==============================================================================
   COMMUNITY POLLS
   ============================================================================== */

.poll-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0.85rem 0;
}

.poll-question {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.poll-option-row {
  position: relative;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.poll-option-row:hover {
  border-color: var(--primary);
}

.poll-option-row.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.poll-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--primary-light);
  opacity: 0.65;
  transition: width 0.4s ease;
  z-index: 1;
}

.poll-option-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.poll-option-text {
  font-weight: 600;
  color: var(--text-main);
}

.poll-option-pct {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
}

.poll-footer {
  margin-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.poll-voted-tag {
  color: var(--success);
  font-weight: 700;
}

/* ==============================================================================
   MENTIONS & HASHTAGS
   ============================================================================== */

.mention-autocomplete-popup {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  margin-bottom: 4px;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.mention-item:hover {
  background: var(--bg-hover);
}

.mention-tag {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.mention-tag:hover {
  text-decoration: underline;
}

.hashtag-tag {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* ==============================================================================
   DIETARY & ALLERGY FILTER CHIPS
   ============================================================================== */

.dietary-filter-bar {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.dietary-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.dietary-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dietary-chip:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.dietary-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.dietary-chip-mini {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
}

.profile-dietary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.dietary-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

/* ==============================================================================
   GAMIFIED CHEF BADGES & PROGRESSION
   ============================================================================== */

.chef-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: default;
}

.chef-badge-pill.legendary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e1b4b;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.35);
}

.chef-badge-pill.gold {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  border: 1px solid #fcd34d;
}

.chef-badge-pill.silver {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==============================================================================
   RECIPE GENEALOGY & FORKS (TWISTS & ADAPTATIONS)
   ============================================================================== */

.recipe-lineage-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: linear-gradient(135deg, rgba(35, 93, 67, 0.08), rgba(217, 119, 6, 0.08));
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--secondary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.lineage-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.lineage-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.lineage-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.lineage-link:hover {
  text-decoration: underline;
}

.lineage-chef-link {
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.lineage-chef-link:hover {
  color: var(--primary);
}

.lineage-twist-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--secondary);
}

/* Forks & Community Variations Grid */
.forks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.fork-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.fork-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.fork-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.fork-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  cursor: pointer;
  line-height: 1.3;
}

.fork-card-title:hover {
  color: var(--primary);
}

.fork-card-notes {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0.85rem 0;
  line-height: 1.4;
  border-left: 3px solid var(--secondary);
}

.fork-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
}

/* Editor Fork Banner */
.editor-fork-banner {
  background: linear-gradient(135deg, rgba(35, 93, 67, 0.08), rgba(217, 119, 6, 0.08));
  border: 1px dashed var(--secondary);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

/* ==============================================================================
   TRENDING TOPICS & HASHTAGS
   ============================================================================== */

.trending-topics-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.trending-topics-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.trending-pills-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.trending-pills-list::-webkit-scrollbar {
  height: 4px;
}

.trending-pills-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.trending-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.trending-tag-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.trending-tag-pill .tag-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .trending-tag-pill .tag-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.trending-tag-pill:hover .tag-count {
  background: var(--primary);
  color: #ffffff;
}

/* Hashtag Header Banner */
.hashtag-header-banner {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-surface-subtle));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.hashtag-big-icon {
  font-size: 2.2rem;
  line-height: 1;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==============================================================================
   KITCHEN HUB, HERO SPOTLIGHT & SEGMENTED CONTROLS
   ============================================================================== */

/* Hero Inspiration Banner */
.kitchen-hub-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(35, 93, 67, 0.92), rgba(24, 68, 49, 0.95)), url('https://images.unsplash.com/photo-1556910103-1c02745aae4d?w=1200&auto=format&fit=crop') center/cover;
  color: #ffffff;
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.kitchen-hub-hero-content {
  max-width: 600px;
}

.kitchen-hub-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.kitchen-hub-hero h1 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.kitchen-hub-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.kitchen-hub-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kitchen-hub-hero-actions .btn-hero-primary {
  background: var(--secondary);
  color: #ffffff;
  font-weight: 700;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.kitchen-hub-hero-actions .btn-hero-primary:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
}

.kitchen-hub-hero-actions .btn-hero-secondary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.kitchen-hub-hero-actions .btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Compact Single-Line Trending Strip */
.hub-trending-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
}

.hub-trending-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.hub-trending-tags-scroll {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.hub-trending-tags-scroll::-webkit-scrollbar {
  display: none;
}

.hub-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.hub-tag-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Modern Segmented Navigation & Filter Bar */
.hub-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.segmented-control {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  gap: 0.2rem;
}

.segmented-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.segmented-btn:hover {
  color: var(--text-main);
}

.segmented-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Filter Dropdown Popover */
.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.filter-toggle-btn:hover {
  border-color: var(--primary);
  background: var(--bg-surface-subtle);
}

.filter-toggle-btn.has-filters {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-drawer-panel {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.filter-drawer-panel.open {
  display: block;
}

.filter-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.filter-drawer-col label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  display: block;
  margin-bottom: 0.35rem;
}

/* Recipe Card Polish */
.recipe-card-img-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-surface-subtle);
}

.recipe-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-card-img-wrap img {
  transform: scale(1.04);
}

.recipe-card-time-pill {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.recipe-card-fork-pill {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

