/**
 * style.css - v1
 * Catur's Hub - Personal launcher
 *
 * Struktur:
 * 1. CSS Variables (light/dark mode)
 * 2. Base & Reset
 * 3. Layout (sidebar + main)
 * 4. Sidebar
 * 5. Main content (header, ranking, cards)
 * 6. Sticky bar & scroll-to-top
 * 7. States (loading, empty, error)
 * 8. Color palette (untuk dynamic class)
 * 9. Responsive
 */

/* ============================================
   1. CSS VARIABLES
   ============================================ */

:root {
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', Monaco, Consolas, monospace;

  /* Spacing */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Sidebar */
  --sidebar-width: 220px;
  --sidebar-width-collapsed: 60px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-medium: 0.25s ease;
}

/* Light mode (default) */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f3;
  --bg-tertiary: #faf9f5;
  --bg-info: #E6F1FB;
  --bg-warning: #FAEEDA;

  --text-primary: #1a1a1a;
  --text-secondary: #5f5e5a;
  --text-tertiary: #888780;
  --text-info: #185FA5;
  --text-warning: #854F0B;

  --border-tertiary: rgba(0, 0, 0, 0.08);
  --border-secondary: rgba(0, 0, 0, 0.15);
  --border-primary: rgba(0, 0, 0, 0.25);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Dark mode */
[data-theme="dark"] {
  --bg-primary: #1f1f1f;
  --bg-secondary: #161616;
  --bg-tertiary: #0d0d0d;
  --bg-info: rgba(55, 138, 221, 0.15);
  --bg-warning: rgba(186, 117, 23, 0.15);

  --text-primary: #f0f0f2;
  --text-secondary: #a0a09a;
  --text-tertiary: #6a6a65;
  --text-info: #85B7EB;
  --text-warning: #EF9F27;

  --border-tertiary: rgba(255, 255, 255, 0.08);
  --border-secondary: rgba(255, 255, 255, 0.15);
  --border-primary: rgba(255, 255, 255, 0.25);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ============================================
   2. BASE & RESET
   ============================================ */

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* ============================================
   3. LAYOUT
   ============================================ */

.app-container {
  display: flex;
  min-height: 100vh;
  background: var(--bg-tertiary);
}

.main {
  flex: 1;
  min-width: 0;
  position: relative;
}

/* ============================================
   4. SIDEBAR
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-primary);
  border-right: 0.5px solid var(--border-tertiary);
  padding: 1.25rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width var(--transition-medium);
}

.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
  padding: 1.25rem 0.5rem;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 14px;
  border-bottom: 0.5px solid var(--border-tertiary);
  margin-bottom: 10px;
  gap: 8px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  background: var(--bg-info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-info);
  flex-shrink: 0;
}

.profile-info {
  min-width: 0;
}

.profile-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-subtitle {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .profile-info,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-count,
.sidebar.collapsed .section-label,
.sidebar.collapsed .nav-chevron,
.sidebar.collapsed .subnav {
  display: none;
}

.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 8px;
}

.sidebar-toggle {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}

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

.sidebar-toggle svg {
  transition: transform var(--transition-medium);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  width: 100%;
  text-align: left;
}

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

.nav-item.active {
  background: var(--bg-info);
  color: var(--text-info);
  font-weight: 500;
}

.nav-icon {
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-count {
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.nav-item.active .nav-count {
  color: inherit;
}

.nav-chevron {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.nav-chevron.expanded {
  transform: rotate(0deg);
}

.nav-chevron.collapsed {
  transform: rotate(-90deg);
}

.section-label {
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.8px;
  margin: 14px 0 6px;
  padding: 0 10px;
}

.subnav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.subnav.hidden {
  display: none;
}

.subnav .nav-item {
  padding: 6px 10px 6px 32px;
  font-size: 12px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 0.5px solid var(--border-tertiary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item--button {
  border: none;
  font-size: 12px;
}

/* ============================================
   5. MAIN CONTENT
   ============================================ */

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 0.5px solid var(--border-tertiary);
  margin-bottom: 1.25rem;
  gap: 12px;
  flex-wrap: wrap;
}

.greeting-text {
  font-size: 16px;
  font-weight: 500;
}

.greeting-date {
  font-size: 12px;
  color: var(--text-secondary);
}

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

/* Search bar full width (SIMPONI-style) */
.search-wrapper {
  position: relative;
  margin: 0 1.5rem 1rem;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input-large {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  font-size: 13px;
  background: var(--bg-secondary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.search-input-large:hover {
  border-color: var(--border-secondary);
}

.search-input-large:focus {
  border-color: var(--text-info);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px var(--bg-info);
}

.search-input-large::placeholder {
  color: var(--text-tertiary);
}

/* Pill filter (SIMPONI-style) */
.pill-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 1.5rem;
  margin-bottom: 1.5rem;
}

.pill {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 0.5px solid var(--border-tertiary);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

.pill.active {
  background: var(--text-info);
  color: white;
  border-color: var(--text-info);
  font-weight: 500;
}

.pill-counter {
  background: var(--bg-tertiary);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.pill.active .pill-counter {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.action-button {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0.5px solid var(--border-tertiary);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
}

.action-button:hover {
  background: var(--bg-secondary);
  border-color: var(--border-secondary);
}

.action-button:active {
  transform: scale(0.98);
}

.icon-button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--border-tertiary);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

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

.icon-button--header {
  width: 36px;
  height: 36px;
}

.icon-button--header svg {
  width: 16px;
  height: 16px;
}

.main-content {
  padding: 0 1.5rem 4rem;
}

/* Hapus ranking widget yang tidak dipakai lagi - tetap ada untuk backward compat */
.ranking-widget {
  display: none;
}

/* Section heading - lebih besar SIMPONI-style */
.section-heading {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.section-heading svg {
  flex-shrink: 0;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 0 0.25rem;
}

.section-counter {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 1.75rem;
}

/* App card - center alignment SIMPONI-style */
.card {
  background: var(--bg-primary);
  border: 0.5px solid var(--border-tertiary);
  border-left: 3px solid var(--card-accent, var(--border-secondary));
  border-radius: 16px;
  padding: 1.75rem 1.25rem 1.25rem;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
  color: inherit;
  display: block;
  text-align: center;
}

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

.card:active {
  transform: translateY(0);
}

.card-favorite {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast);
  z-index: 2;
}

.card-favorite:hover {
  background: var(--bg-secondary);
}

.card-favorite svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.card-favorite:active svg {
  transform: scale(1.2);
}

/* Icon besar di tengah dengan background tinted */
.card-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: var(--card-icon-bg, var(--bg-secondary));
  color: var(--card-icon-color, var(--text-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 500;
  font-size: 28px;
}

.card-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.8;
}

.card-icon iconify-icon {
  font-size: 44px;
}

.card-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.card-name {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--card-icon-color, var(--text-primary));
}

.card-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 6px;
  line-height: 1.5;
}

.card-note {
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 0 0 14px;
  font-style: italic;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
  border-top: 0.5px solid var(--border-tertiary);
  margin-top: 14px;
  gap: 6px;
}

.card-footer.has-badge {
  justify-content: space-between;
}

.card-last-opened {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-subcategory-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--card-icon-bg, var(--bg-secondary));
  color: var(--card-icon-color, var(--text-secondary));
}

/* Add new card placeholder */
.card-add {
  background: var(--bg-primary);
  border: 0.5px dashed var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.card-add:hover {
  border-color: var(--text-info);
  background: var(--bg-secondary);
}

.card-add-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 16px;
}

.card-add-text {
  font-size: 12px;
}

/* Subcategory section heading */
.subcategory-heading {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  padding: 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subcategory-heading::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--subcategory-color, var(--border-secondary));
  border-radius: 2px;
}

/* ============================================
   6. STICKY BAR & SCROLL TO TOP
   ============================================ */

.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0.5px solid var(--border-tertiary);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-medium), opacity var(--transition-medium);
}

[data-theme="dark"] .sticky-bar {
  background: rgba(31, 31, 31, 0.85);
}

.sticky-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-bar-top {
  padding: 8px 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-bar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.sticky-bar-breadcrumb-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.sticky-bar-breadcrumb-separator {
  font-size: 11px;
  color: var(--text-tertiary);
}

.sticky-bar-breadcrumb-sub {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sticky-bar-divider {
  width: 0.5px;
  height: 18px;
  background: var(--border-tertiary);
  flex-shrink: 0;
}

.sticky-bar-search {
  flex: 1;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  min-width: 0;
  border: 0.5px solid var(--border-tertiary);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.sticky-bar-search:focus {
  border-color: var(--text-info);
}

.sticky-bar-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Pill filter versi sticky - lebih kecil & compact */
.pill-filter--sticky {
  padding: 8px 1.5rem 10px;
  margin-bottom: 0;
  border-top: 0.5px solid var(--border-tertiary);
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pill-filter--sticky::-webkit-scrollbar {
  display: none;
}

.pill-filter--sticky .pill {
  height: 28px;
  padding: 0 12px;
  font-size: 11px;
  border-radius: 14px;
  flex-shrink: 0;
}

.pill-filter--sticky .pill-counter {
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
}

/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 0.5px solid var(--border-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.9);
  transition: opacity var(--transition-medium), transform var(--transition-medium), background var(--transition-fast), color var(--transition-fast);
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.scroll-to-top:active {
  transform: scale(0.92);
}

/* ============================================
   7. STATES
   ============================================ */

.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg-tertiary);
  z-index: 1000;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-tertiary);
  border-top-color: var(--text-info);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-screen p {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  gap: 12px;
}

.empty-state svg {
  color: var(--text-tertiary);
}

.empty-state-title, .error-state-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.empty-state-subtitle, .error-state-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 400px;
}

/* ============================================
   8. COLOR PALETTE (untuk dynamic styling)
   ============================================ */
/* Mapping warna untuk light & dark mode
   Dipakai sebagai inline style via JavaScript */

/* Variable untuk akses dari JS */
:root {
  /* Light mode mappings (default) */
  --c-blue-50: #E6F1FB;
  --c-blue-200: #85B7EB;
  --c-blue-600: #185FA5;
  --c-blue-800: #0C447C;

  --c-purple-50: #EEEDFE;
  --c-purple-200: #AFA9EC;
  --c-purple-600: #534AB7;
  --c-purple-800: #3C3489;

  --c-teal-50: #E1F5EE;
  --c-teal-200: #5DCAA5;
  --c-teal-600: #1D9E75;
  --c-teal-800: #0F6E56;

  --c-green-50: #EAF3DE;
  --c-green-200: #97C459;
  --c-green-600: #639922;
  --c-green-800: #3B6D11;

  --c-amber-50: #FAEEDA;
  --c-amber-200: #FAC775;
  --c-amber-600: #BA7517;
  --c-amber-800: #854F0B;

  --c-coral-50: #FAECE7;
  --c-coral-200: #F0997B;
  --c-coral-600: #D85A30;
  --c-coral-800: #993C1D;

  --c-pink-50: #FBEAF0;
  --c-pink-200: #ED93B1;
  --c-pink-600: #D4537E;
  --c-pink-800: #993556;

  --c-red-50: #FCEBEB;
  --c-red-200: #F09595;
  --c-red-600: #E24B4A;
  --c-red-800: #A32D2D;

  --c-gray-50: #F1EFE8;
  --c-gray-200: #B4B2A9;
  --c-gray-600: #5F5E5A;
  --c-gray-800: #444441;
}

/* Dark mode color adjustments */
[data-theme="dark"] {
  --c-blue-50: rgba(55, 138, 221, 0.15);
  --c-blue-600: #85B7EB;
  --c-blue-800: #B5D4F4;

  --c-purple-50: rgba(127, 119, 221, 0.15);
  --c-purple-600: #AFA9EC;
  --c-purple-800: #CECBF6;

  --c-teal-50: rgba(29, 158, 117, 0.15);
  --c-teal-600: #5DCAA5;
  --c-teal-800: #9FE1CB;

  --c-green-50: rgba(99, 153, 34, 0.15);
  --c-green-600: #97C459;
  --c-green-800: #C0DD97;

  --c-amber-50: rgba(186, 117, 23, 0.15);
  --c-amber-600: #EF9F27;
  --c-amber-800: #FAC775;

  --c-coral-50: rgba(216, 90, 48, 0.15);
  --c-coral-600: #F0997B;
  --c-coral-800: #F5C4B3;

  --c-pink-50: rgba(212, 83, 126, 0.15);
  --c-pink-600: #ED93B1;
  --c-pink-800: #F4C0D1;

  --c-red-50: rgba(226, 75, 74, 0.15);
  --c-red-600: #F09595;
  --c-red-800: #F7C1C1;

  --c-gray-50: rgba(180, 178, 169, 0.15);
  --c-gray-600: #B4B2A9;
  --c-gray-800: #D3D1C7;
}

/* ============================================
   9. RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform var(--transition-medium);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-header {
    padding: 1rem;
  }

  .search-wrapper {
    margin: 0 1rem 1rem;
  }

  .pill-filter {
    padding: 0 1rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pill-filter::-webkit-scrollbar {
    display: none;
  }

  .main-content {
    padding: 0 1rem 4rem;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
  }

  .card {
    padding: 1.25rem 1rem 1rem;
  }

  .card-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    margin-bottom: 12px;
  }

  .card-icon svg {
    width: 32px;
    height: 32px;
  }

  .card-name {
    font-size: 14px;
  }

  .sticky-bar-top {
    padding: 8px 1rem;
  }

  .pill-filter--sticky {
    padding: 8px 1rem 10px;
  }

  .scroll-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* Print: hide non-essential UI */
@media print {
  .sidebar, .scroll-to-top, .sticky-bar, .header-actions {
    display: none;
  }
}
