/* ========================================================
   CAT HUNTER - WARM MINIMALIST 3-COLUMN DESIGN SYSTEM
   Figma-Accurate Responsive Layout (Mobile -> Desktop Grid)
   ======================================================== */

:root {
  /* Warm Minimalist Light Palette */
  --bg-primary: #FAF7F2;       /* Warm Sand / Cream */
  --bg-card: #FFFFFF;
  --bg-secondary: #F4EFEB;     /* Muted Sandstone */
  --bg-hover: #ECE4DC;
  --text-primary: #1A1715;     /* Dark Espresso */
  --text-secondary: #7A726B;   /* Muted Warm Taupe */
  --text-tertiary: #A69E96;
  
  /* Brand Accents */
  --accent: #E07A5F;           /* Terracotta */
  --accent-hover: #CE684E;
  --accent-soft: rgba(224, 122, 95, 0.12);
  --accent-amber: #F4A261;     /* Warm Amber */
  --accent-amber-soft: rgba(244, 162, 97, 0.14);
  --accent-sage: #81B29A;      /* Sage Green */
  --accent-sage-soft: rgba(129, 178, 154, 0.14);
  --accent-rose: #E76F51;
  --accent-rose-soft: rgba(231, 111, 81, 0.14);
  
  --border-color: rgba(26, 23, 21, 0.08);
  --border-subtle: rgba(26, 23, 21, 0.04);
  --card-shadow: 0 4px 20px -2px rgba(26, 23, 21, 0.04), 0 2px 6px -1px rgba(26, 23, 21, 0.02);
  --widget-shadow: 0 2px 12px rgba(26, 23, 21, 0.03);
  --modal-backdrop: rgba(26, 23, 21, 0.55);
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --nav-height: 62px;
}

[data-theme="dark"] {
  --bg-primary: #131110;       /* Deep Roast Espresso */
  --bg-card: #1D1A18;
  --bg-secondary: #272320;
  --bg-hover: #342F2B;
  --text-primary: #F7F4EE;     /* Soft Warm Ivory */
  --text-secondary: #A0988F;
  --text-tertiary: #6E6760;
  
  --accent: #E07A5F;
  --accent-hover: #EA8D74;
  --accent-soft: rgba(224, 122, 95, 0.22);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --card-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
  --widget-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  --modal-backdrop: rgba(0, 0, 0, 0.75);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

/* Scrollbar Minimalis */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-tertiary);
  border-radius: var(--radius-full);
}

/* ========================================================
   RESPONSIVE APP LAYOUT CONTAINER
   ======================================================== */
.app-layout-container {
  width: 100%;
  margin: 0 auto;
  transition: all 0.3s ease;
}

/* Default Mobile: 1 Column */
.sidebar-left,
.sidebar-right {
  display: none;
}

.main-column {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 10px 16px 80px; /* Space for mobile bottom dock */
}

/* ========================================================
   DESKTOP 3-COLUMN GRID (@media min-width: 1024px)
   ======================================================== */
@media (min-width: 1024px) {
  body {
    padding-bottom: 0; /* No mobile dock */
  }

  /* Sembunyikan Header & Dock Mobile di Desktop */
  .mobile-only {
    display: none !important;
  }

  .app-layout-container {
    max-width: 1260px;
    display: grid;
    grid-template-columns: 240px minmax(520px, 620px) 330px;
    justify-content: center;
    gap: 32px;
    padding: 24px 20px;
  }

  /* 1. KOLOM KIRI (Sidebar Navigasi Sticky ~240px) */
  .sidebar-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    padding-right: 12px;
  }

  .sidebar-brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 28px;
    cursor: pointer;
  }

  .sidebar-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-amber) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(224, 122, 95, 0.3);
  }

  .sidebar-brand-info h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
  }

  .community-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .sidebar-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
  }

  .nav-item .nav-icon {
    font-size: 1.25rem;
    width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }

  .nav-item.active {
    background: var(--bg-card);
    color: var(--accent);
    font-weight: 800;
    box-shadow: var(--card-shadow);
  }

  .btn-sidebar-post {
    margin-top: 18px;
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #FFFFFF;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(224, 122, 95, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .btn-sidebar-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.45);
  }

  .sidebar-bottom-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 20px;
  }

  .user-brief {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .user-brief-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .user-brief-text h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
  }

  .user-brief-text p {
    font-size: 0.72rem;
    color: var(--text-secondary);
  }

  /* 2. KOLOM TENGAH (Main Feed ~600px) */
  .main-column {
    padding: 0;
    max-width: 620px;
    margin: 0;
  }

  /* 3. KOLOM KANAN (Widgets Sticky ~300px) */
  .sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    overflow-y: auto;
    padding-left: 4px;
  }
}

/* ========================================================
   HEADER BERANDA & KOTA SELECTOR (KOLOM TENGAH)
   ======================================================== */
.feed-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.feed-header-title h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.city-selector-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  box-shadow: var(--widget-shadow);
}

.city-select-dropdown {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

/* FILTER TABS PILLS */
.feed-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.feed-tabs-row::-webkit-scrollbar {
  display: none;
}

.feed-pill-btn {
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-pill-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent);
}

.feed-pill-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: 700;
}

/* SUB-FILTER KECAMATAN MEDAN */
.district-sub-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.district-sub-row::-webkit-scrollbar {
  display: none;
}

.district-chip {
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.district-chip.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

/* ========================================================
   COMPOSER CARD (PROMPT "APA KABAR SI MANIS?")
   ======================================================== */
.composer-prompt-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}

.composer-prompt-box:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.composer-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.composer-input-placeholder {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.composer-quick-actions {
  display: flex;
  gap: 8px;
}

.composer-icon-badge {
  background: var(--bg-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--accent);
}

/* ========================================================
   FEED POST CARDS (WARM MINIMALIST THREADS STYLE)
   ======================================================== */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeIn 0.3s ease;
}

.post-card:hover {
  border-color: rgba(224, 122, 95, 0.25);
}

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

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

.author-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

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

.author-badge {
  font-size: 0.72rem;
  color: var(--accent);
  margin-left: 4px;
}

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

/* Badges for Spotting */
.spot-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.badge-location {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-status {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-urgent {
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
  border: 1px solid rgba(231, 111, 81, 0.3);
}

.status-hungry {
  background: var(--accent-amber-soft);
  color: #D97706;
  border: 1px solid rgba(244, 162, 97, 0.3);
}

.status-healthy {
  background: var(--accent-sage-soft);
  color: #2D6A4F;
  border: 1px solid rgba(129, 178, 154, 0.3);
}

.spot-landmark {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  font-style: italic;
}

.post-body {
  font-size: 0.96rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
  word-break: break-word;
}

.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.post-tag {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

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

.post-media-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--bg-secondary);
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.post-media-container img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-media-container img:hover {
  transform: scale(1.01);
}

/* Actions Bar */
.post-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

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

.action-btn.saved {
  color: var(--accent-amber);
}

/* ========================================================
   WIDGETS KOLOM KANAN (DESKTOP)
   ======================================================== */
.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--widget-shadow);
}

/* 1. Search Box */
.search-widget-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 10px 16px 10px 38px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon-inside {
  position: absolute;
  left: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

/* 2. Banner Program Steril & Rescue */
.banner-rescue-card {
  background: linear-gradient(135deg, rgba(224, 122, 95, 0.12) 0%, rgba(244, 162, 97, 0.16) 100%);
  border: 1px solid rgba(224, 122, 95, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.banner-badge {
  display: inline-block;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.banner-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 6px;
}

.banner-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.btn-banner-action {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-banner-action:hover {
  opacity: 0.9;
}

/* 3. Trending Tags Widget */
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.widget-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.15s ease;
}

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

.trending-item:hover {
  transform: translateX(3px);
}

.trending-tag-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.trending-tag-posts {
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

/* 4. Rekanan Pet Care Widget */
.vet-mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vet-mini-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.vet-mini-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.vet-mini-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.vet-mini-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
  white-space: nowrap;
}

.vet-mini-location {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.btn-mini-wa {
  background: #25D366;
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  transition: opacity 0.2s;
}

.btn-mini-wa:hover {
  opacity: 0.9;
}

/* ========================================================
   DIREKTORI PET CARE FULL CARDS
   ======================================================== */
.vet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.vet-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.vet-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #D97706;
}

.vet-address {
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.vet-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.vet-service-tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.vet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
}

.vet-hours {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.vet-hours.emergency {
  color: #E76F51;
  font-weight: 700;
}

.vet-action-btns {
  display: flex;
  gap: 8px;
}

.btn-wa {
  background: #25D366;
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.btn-wa:hover {
  opacity: 0.9;
}

.btn-maps {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ========================================================
   MODAL COMPOSER (BUAT THREAD / SPOT KUCING)
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-card);
  width: 100%;
  max-width: 580px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .modal-container {
    border-radius: var(--radius-lg);
    transform: translateY(20px) scale(0.96);
  }
  .modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
  }
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.type-selector {
  display: flex;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.type-btn {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.type-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.image-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-secondary);
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.image-upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.preview-box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  display: none;
}

.preview-box img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.remove-img-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.submit-post-btn {
  width: 100%;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-post-btn:hover {
  background: var(--accent-hover);
}

.submit-post-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================================
   MOBILE HEADER & BOTTOM NAVIGATION DOCK (< 1024px)
   ======================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--bg-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.brand-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-amber) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #FFFFFF;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

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

.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.dock-item {
  background: none;
  border: none;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  transition: all 0.2s ease;
}

.dock-item .dock-icon {
  font-size: 20px;
}

.dock-item.active {
  color: var(--accent);
  font-weight: 700;
}

.dock-fab {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-amber) 100%);
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 122, 95, 0.4);
  transform: translateY(-8px);
}

/* ========================================================
   TOAST NOTIFICATION & EMPTY STATES
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px);
  animation: toastIn 0.3s forwards ease;
}

@keyframes toastIn {
  to { opacity: 1; transform: translateY(0); }
}

.state-message {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.state-message .state-emoji {
  font-size: 42px;
  margin-bottom: 10px;
}

.state-message p {
  font-size: 0.95rem;
}

/* ========================================================
   MODAL KOMENTAR, NOTIFIKASI & PROFIL
   ======================================================== */
.comment-post-preview {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.comment-preview-author {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--accent);
  margin-bottom: 2px;
}

.comment-preview-content {
  font-size: 0.88rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comments-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.comment-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.comment-author-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.comment-time {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.comment-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.comment-input-form {
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.comment-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.submit-comment-btn {
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.submit-comment-btn:hover {
  opacity: 0.9;
}

/* Notifikasi Modal Items */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.notif-icon {
  font-size: 22px;
}

.notif-content p {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.notif-content span {
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

/* ========================================================
   THREADS-STYLE NAVIGATION & BURGER POPOVER
   ======================================================== */
.sidebar-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}

.sidebar-top-bar .sidebar-brand-box {
  margin-bottom: 0;
}

.threads-burger-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1.25rem;
}

.threads-burger-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
  transform: scale(1.05);
}

.burger-menu-anchor {
  position: relative;
}

.threads-popover {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  padding: 8px;
  min-width: 210px;
  z-index: 280;
  display: none;
  flex-direction: column;
  gap: 3px;
  animation: threadsPopoverFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes threadsPopoverFade {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.threads-popover-item {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
  width: 100%;
}

.threads-popover-item:hover {
  background: var(--bg-secondary);
}

.popover-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popover-icon {
  font-size: 1.1rem;
}

.popover-item-badge {
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.threads-popover-hr {
  height: 1px;
  background: var(--border-color);
  margin: 4px 6px;
}

.popover-auth-btn {
  color: var(--accent);
  font-weight: 700;
}

/* Tombol Pill Modern Rounded ala Threads */
.btn-threads-pill-login {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
}

.btn-threads-pill-login:hover {
  opacity: 0.9;
  transform: scale(0.98);
}

.btn-pill-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn-sidebar-pill-login {
  width: 100%;
  padding: 12px 20px;
  font-size: 0.94rem;
}

/* Sidebar Footer Profile Card (Tanpa tombol aneh) */
.sidebar-footer-profile {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.threads-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.threads-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.threads-user-handle {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.threads-user-role {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
}

.threads-logout-mini-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.6;
  padding: 4px;
  transition: opacity 0.2s;
}

.threads-logout-mini-btn:hover {
  opacity: 1;
}

/* Header Top Right Profile & Log in Bar */
.feed-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feed-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.threads-header-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 14px 4px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.threads-header-user-chip:hover {
  border-color: var(--text-secondary);
}

.user-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.user-chip-handle {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ========================================================
   MODAL LOGIN & REGISTER PERSIS GAYA THREADS (META)
   ======================================================== */
.threads-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.threads-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.threads-auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 26px;
  padding: 38px 32px 30px;
  width: 100%;
  max-width: 410px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.threads-modal-overlay.active .threads-auth-card {
  transform: scale(1) translateY(0);
}

.threads-auth-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--text-tertiary);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}

.threads-auth-close-btn:hover {
  color: var(--text-primary);
}

.threads-auth-logo {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-amber) 100%);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(224, 122, 95, 0.28);
}

.threads-auth-header {
  margin-bottom: 20px;
  width: 100%;
}

.threads-auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.threads-auth-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.threads-auth-notice {
  width: 100%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.threads-auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.threads-input-group {
  width: 100%;
}

.threads-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.threads-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 500;
}

.threads-input:focus {
  border-color: var(--text-primary);
  background: var(--bg-card);
}

.threads-btn-primary {
  width: 100%;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.threads-btn-primary:hover {
  opacity: 0.9;
  transform: scale(0.99);
}

.threads-forgot-link {
  margin-top: 4px;
  font-size: 0.82rem;
}

.threads-forgot-link a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.threads-forgot-link a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.threads-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
}

.threads-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.threads-divider-text {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  text-transform: lowercase;
  font-weight: 600;
}

.threads-social-auth {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.threads-btn-social {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.threads-btn-social:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

.threads-social-icon {
  flex-shrink: 0;
}

.threads-switch-mode {
  margin-top: 22px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.threads-switch-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.threads-switch-link:hover {
  color: var(--accent);
}
