/* ==========================================================================
   TỔ ẤM SỐ - DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-display: 'Plus Jakarta Sans', sans-serif;

  /* Colors (Light Theme by default - Futuristic pure white slate) */
  --bg-primary: #fbfbfb;
  --bg-secondary: #f4f4f6;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.45);
  --border-color: #ededf2;
  --border-focus: #06b6d4;

  --glow-cyan: rgba(6, 182, 212, 0.07);
  --glow-yellow: rgba(234, 179, 8, 0.06);

  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --text-inverse: #ffffff;

  --primary: #06b6d4;
  --primary-hover: #0891b2;
  --primary-light: rgba(6, 182, 212, 0.05);

  --secondary: #eab308;
  --secondary-hover: #ca8a04;
  --secondary-light: rgba(234, 179, 8, 0.05);

  --accent: #22d3ee;
  --accent-hover: #06b6d4;
  --accent-light: rgba(34, 211, 238, 0.1);

  --success: #10b981;
  --success-hover: #059669;
  --success-light: rgba(16, 185, 129, 0.05);

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-outline: #fca5a5;
  --danger-light: rgba(239, 68, 68, 0.05);

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.03), 0 2px 8px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 30px -10px rgba(6, 182, 212, 0.04), 0 4px 12px -2px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 40px -15px rgba(6, 182, 212, 0.06), 0 10px 20px -5px rgba(0, 0, 0, 0.02);
  --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03);

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Dark Theme Variables --- */
[data-theme="dark"] {
  --bg-primary: #050508;
  --bg-secondary: #0d0d14;
  --bg-card: #12121c;
  --bg-glass: rgba(18, 18, 28, 0.6);
  --border-color: #212130;
  --border-focus: #06b6d4;

  --glow-cyan: rgba(6, 182, 212, 0.18);
  --glow-yellow: rgba(234, 179, 8, 0.12);

  --text-primary: #f4f4f7;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --text-inverse: #050508;

  --primary: #06b6d4;
  --primary-hover: #22d3ee;
  --primary-light: rgba(6, 182, 212, 0.15);

  --secondary: #eab308;
  --secondary-hover: #fde047;
  --secondary-light: rgba(234, 179, 8, 0.15);

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4), 0 2px 8px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 10px 20px -5px rgba(0, 0, 0, 0.4);
}

/* --- Base Resets & Global Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 0% 0%, var(--glow-cyan), transparent 45%),
    radial-gradient(circle at 100% 100%, var(--glow-yellow), transparent 45%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Layout Grid --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

/* --- Common UI Components --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--primary-light);
  color: var(--primary);
  width: fit-content;
}
.badge-accent {
  background-color: var(--accent-light);
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-family-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}
.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-muted);
}
.btn-accent {
  background-color: var(--accent);
  color: #ffffff;
}
.btn-accent:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}
.btn-danger-outline {
  background-color: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger-outline:hover {
  background-color: var(--danger);
  color: #ffffff;
}

/* Glass Card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* --- Header Styling --- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  height: 70px;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: #09090b;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.logo-area:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.app-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
}
.app-title {
  font-family: var(--font-family-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
}
.nav-links {
  display: flex;
  gap: 8px;
}
.nav-link {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-icon {
  display: none;
  width: 18px;
  height: 18px;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.btn-theme-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--primary);
}
.sun-icon { display: none; width: 20px; height: 20px; }
.moon-icon { display: block; width: 20px; height: 20px; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* --- App View Controller --- */
.app-view {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.app-view.active {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   1. DASHBOARD VIEW STYLES
   ========================================================================== */

/* Hero Section */
.hero-section {
  padding: 80px 0 60px 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, var(--secondary-light), transparent 45%);
}
.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}
.hero-content h1 {
  font-size: 2.8rem;
  margin-top: 15px;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}
.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 35px;
}
.feature-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.feature-tag svg {
  width: 18px;
  height: 18px;
  color: var(--success);
}
.hero-actions {
  display: flex;
  gap: 15px;
}
.hero-visual {
  display: flex;
  justify-content: flex-end;
}

/* Mock Planner Preview card inside Hero */
.mock-planner-preview {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.mock-header {
  background-color: var(--bg-secondary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
}
.mock-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mock-header .dot.red { background-color: var(--danger); }
.mock-header .dot.yellow { background-color: var(--accent); }
.mock-header .dot.green { background-color: var(--success); }
.mock-title {
  margin-left: 8px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.mock-body {
  padding: 20px;
}
.mock-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.mock-progress-bar {
  height: 6px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 20px;
}
.mock-progress-bar .fill {
  height: 100%;
  background-color: var(--success);
}
.mock-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.mock-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.mock-checklist li .checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.mock-checklist li.checked .checkbox {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.mock-checklist li.checked span {
  text-decoration: line-through;
  color: var(--text-muted);
}
.mock-checklist li .checkbox svg {
  width: 12px;
  height: 12px;
}
.mock-budget {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  font-size: 0.85rem;
}
.color-success { color: var(--success); }

/* Catalog Section */
.catalog-section {
  padding: 60px 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 35px;
  flex-wrap: wrap;
  gap: 20px;
}
.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 6px;
}
.search-box {
  position: relative;
  max-width: 400px;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}
.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Category filter tags */
.filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.filter-tag {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}
.filter-tag:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}
.filter-tag.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Templates Grid & Cards */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.template-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: transparent;
  transition: background-color var(--transition-fast);
}
.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text-muted);
}
.template-card:hover::before {
  background-color: var(--primary);
}
.t-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.t-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.t-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.template-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.template-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex-grow: 1;
}
.t-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.t-progress-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.t-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.t-progress-bar {
  height: 4px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.t-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width var(--transition-normal);
}
.t-action-link {
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.t-badge-custom {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--accent-light);
  color: var(--accent);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* Features Highlights Section */
.features-section {
  background-color: var(--bg-secondary);
  padding: 80px 0;
  transition: background-color var(--transition-normal);
}
.section-center-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px auto;
}
.section-center-header h2 {
  margin-bottom: 12px;
}
.section-center-header p {
  color: var(--text-secondary);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.feature-card {
  background-color: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.feat-icon svg {
  width: 24px;
  height: 24px;
}
.color-check { background-color: var(--primary-light); color: var(--primary); }
.color-time { background-color: var(--secondary-light); color: var(--secondary); }
.color-budget { background-color: var(--success-light); color: var(--success); }
.color-bag { background-color: var(--accent-light); color: var(--accent); }

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Custom Builder Call-To-Action (CTA) Banner */
.builder-cta-section {
  padding: 60px 0 80px 0;
}
.builder-cta-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 50px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-content h2 {
  font-size: 2.2rem;
  margin-top: 15px;
  margin-bottom: 15px;
}
.cta-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 30px;
}
.cta-preview {
  display: flex;
  justify-content: center;
}
.preview-widget-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
  transform: rotate(5deg);
}
.mini-widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  text-align: center;
}
.w-checklist { border-left: 4px solid var(--primary); }
.w-budget { border-left: 4px solid var(--success); }
.w-timeline { border-left: 4px solid var(--secondary); }


/* ==========================================================================
   2. WORKSPACE VIEW STYLES
   ========================================================================== */

.workspace-header-bar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}
.ws-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.ws-back-area {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-back {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}
.btn-back:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}
.btn-back svg {
  width: 16px;
  height: 16px;
}
.ws-title-group {
  display: flex;
  flex-direction: column;
}
.ws-category-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary);
}
#ws-planner-title {
  font-size: 1.5rem;
  font-weight: 800;
}
.ws-actions-area {
  display: flex;
  gap: 8px;
}

/* Workspace Tabs */
.workspace-tabs-bar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 70px;
  z-index: 99;
}
.tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.ws-tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
}
.ws-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.ws-tab svg {
  width: 16px;
  height: 16px;
}
.ws-tab:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}
.ws-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.ws-overall-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 250px;
  padding: 10px 0;
}
.ws-overall-progress .progress-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 90px;
}
.progress-bar-wrapper {
  flex-grow: 1;
  height: 8px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width var(--transition-normal);
}

/* Workspace Body Panels */
.workspace-bodycontainer {
  padding-top: 30px;
  padding-bottom: 60px;
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Split Pane Layout (Checklist View) */
.panel-layout {
  display: grid;
  grid-template-columns: 1.8fr 0.8fr;
  gap: 30px;
  align-items: start;
}
.sticky-box {
  position: sticky;
  top: 160px;
}
.sidebar-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-box h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.sidebar-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.notes-textarea {
  width: 100%;
  height: 250px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}
.notes-textarea:focus {
  border-color: var(--border-focus);
}
.notes-status {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Smart Checklist Component */
.checklist-workspace-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.checklist-group-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.checklist-group-header {
  background-color: var(--bg-secondary);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}
.checklist-group-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.group-progress-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.checklist-items-list {
  padding: 8px 0;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bg-secondary);
  transition: background-color var(--transition-fast);
}
.checklist-item:last-child {
  border-bottom: none;
}
.checklist-item:hover {
  background-color: var(--primary-light);
}

/* Custom Checkbox Input */
.custom-checkbox-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  height: 22px;
}
.custom-checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  height: 20px;
  width: 20px;
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.custom-checkbox-wrapper:hover input ~ .checkmark {
  border-color: var(--text-muted);
}
.custom-checkbox-wrapper input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.4);
}
.checkmark svg {
  width: 12px;
  height: 12px;
  color: #ffffff;
  display: none;
}
.custom-checkbox-wrapper input:checked ~ .checkmark svg {
  display: block;
}

.checklist-item-content {
  flex-grow: 1;
}
.checklist-item-title {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.checklist-item.item-completed .checklist-item-title {
  text-decoration: line-through;
  color: var(--text-muted);
}
.checklist-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Timeline Component */
.timeline-workspace-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.timeline-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.timeline-visual::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 15px;
  bottom: 15px;
  width: 4px;
  background-color: var(--border-color);
  z-index: 1;
}
.timeline-step-block {
  position: relative;
  padding-left: 60px;
  z-index: 2;
}
.timeline-icon-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 4px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-family-display);
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}
.timeline-step-block.completed .timeline-icon-marker {
  background-color: var(--success);
  border-color: var(--success);
  color: #ffffff;
}
.timeline-step-block.active .timeline-icon-marker {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px var(--primary-light);
}

.timeline-step-content {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color var(--transition-fast);
}
.timeline-step-block.active .timeline-step-content {
  border-color: var(--primary);
}
.timeline-step-content h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.timeline-step-tasks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline-step-tasks li {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline-step-tasks li svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.timeline-step-block.completed .timeline-step-tasks li svg {
  color: var(--success);
}
.timeline-step-tasks li.task-checked {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Budget Component & Table */
.budget-workspace-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.budget-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.budget-card-stat {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.budget-card-stat .label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}
.budget-card-stat .value {
  font-size: 1.8rem;
  font-family: var(--font-family-display);
  font-weight: 800;
}
.b-planned { border-top: 4px solid var(--primary); }
.b-actual { border-top: 4px solid var(--success); }
.b-diff { border-top: 4px solid var(--accent); }

.card-table {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-table-header {
  padding: 20px 24px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.budget-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.budget-table th, .budget-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}
.budget-table th {
  background-color: var(--bg-card);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.budget-table tr:last-child td {
  border-bottom: none;
}
.budget-table input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.budget-table input:focus {
  border-color: var(--border-focus);
}
.btn-delete-row {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  margin: 0 auto;
}
.btn-delete-row:hover {
  background-color: var(--danger-light);
}
.btn-delete-row svg {
  width: 16px;
  height: 16px;
}

/* Products List View */
.products-carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.products-header {
  margin-bottom: 0;
}
.products-header p {
  color: var(--text-secondary);
}
.carousel-nav-buttons {
  display: flex;
  gap: 8px;
}
.btn-carousel {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-carousel:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-carousel svg {
  width: 18px;
  height: 18px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* Products Carousel Viewport */
.products-carousel-viewport {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  gap: 24px;
  padding: 10px 4px;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
}
.products-carousel-viewport::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}
.products-carousel-viewport .product-card {
  flex: 0 0 calc(25% - 18px); /* 4 cards per viewport on desktop */
  scroll-snap-align: start;
}

@media (max-width: 992px) {
  .products-carousel-viewport .product-card {
    flex: 0 0 calc(33.33% - 16px); /* 3 cards on tablet */
  }
}
@media (max-width: 768px) {
  .products-carousel-viewport {
    gap: 16px;
  }
  .products-carousel-viewport .product-card {
    flex: 0 0 calc(50% - 8px); /* 2 cards on mobile */
  }
}
@media (max-width: 480px) {
  .products-carousel-viewport .product-card {
    flex: 0 0 80%; /* 1.25 cards on small mobile to indicate scrollability */
  }
}
.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-image-box {
  width: 100%;
  height: 180px;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border-color);
}
.product-info-box {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}
.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}
.product-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.product-affiliate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--accent-light);
  color: var(--accent-hover);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.product-affiliate-link:hover {
  background-color: var(--accent);
  color: #0f172a;
}
.product-affiliate-link svg {
  width: 14px;
  height: 14px;
}


/* ==========================================================================
   3. CUSTOM PLANNER BUILDER VIEW STYLES
   ========================================================================== */

.builder-header-bar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}
.builder-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.builder-back-area {
  display: flex;
  align-items: center;
  gap: 16px;
}
.builder-title-group {
  display: flex;
  flex-direction: column;
}
.builder-body-container {
  padding-top: 30px;
  padding-bottom: 60px;
}
.builder-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
  align-items: start;
}
.settings-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.settings-card h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Widget Options Panel */
.widget-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn-widget-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}
.btn-widget-opt:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateX(4px);
}
.btn-widget-opt .icon {
  font-size: 1.5rem;
}
.btn-widget-opt .title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.btn-widget-opt .sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Builder Workspace Canvas */
.builder-canvas {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.canvas-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.canvas-paper {
  background-color: var(--bg-card);
  border: 1px dashed var(--text-muted);
  border-radius: var(--radius-lg);
  padding: 30px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

/* Canvas Empty State */
.canvas-empty-state {
  margin: auto;
  text-align: center;
  max-width: 320px;
  padding: 40px 20px;
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.canvas-empty-state h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.canvas-empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Builder Active Widgets in Sandbox */
.canvas-widget {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  overflow: hidden;
  position: relative;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.canvas-widget-header {
  background-color: var(--bg-secondary);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}
.widget-type-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
}
.btn-remove-widget {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}
.btn-remove-widget:hover {
  color: var(--danger-hover);
}
.canvas-widget-body {
  padding: 20px;
}

/* Sandbox Checklist widget inside canvas */
.sandbox-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sandbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sandbox-row input[type="text"] {
  flex-grow: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
}
.sandbox-row input[type="text"]:focus {
  border-color: var(--border-focus);
}
.btn-sandbox-action {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.btn-sandbox-action:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}
.btn-sandbox-delete {
  color: var(--danger);
}
.btn-sandbox-delete:hover {
  background-color: var(--danger-light);
  color: var(--danger-hover);
}
.btn-add-sandbox-row {
  margin-top: 10px;
  background-color: transparent;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 10px;
  width: 100%;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}
.btn-add-sandbox-row:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
}

/* Timeline sandbox widget */
.sandbox-timeline-stage {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  padding: 16px;
  margin-bottom: 16px;
}
.sandbox-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}
.sandbox-stage-header input[type="text"] {
  font-weight: 600;
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Budget table sandbox widget */
.sandbox-budget-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.sandbox-budget-table th, .sandbox-budget-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}
.sandbox-budget-table input {
  padding: 6px 10px;
}


/* ==========================================================================
   4. TOAST NOTIFICATION STYLING
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background-color: var(--text-primary);
  color: var(--text-inverse);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  min-width: 250px;
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}


/* ==========================================================================
   5. FOOTER STYLING
   ========================================================================== */

.main-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 20px 0;
  margin-top: auto;
  transition: background-color var(--transition-normal);
}
.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-family-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}
.footer-logo-img {
  height: 32px;
  width: 32px;
}
.footer-slogan {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 350px;
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col ul a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.footer-col ul a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}
.footer-bottom-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ==========================================================================
   6. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-features {
    justify-content: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    justify-content: center;
    margin-top: 20px;
  }
  .builder-cta-card {
    grid-template-columns: 1fr;
    padding: 40px;
    text-align: center;
  }
  .cta-preview {
    margin-top: 20px;
  }
  .preview-widget-stack {
    transform: rotate(0);
    margin: 0 auto;
  }
  .panel-layout {
    grid-template-columns: 1fr;
  }
  .builder-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 75px; /* Space for the bottom navigation bar */
  }

  /* Compact top header on mobile */
  .main-header {
    height: 60px;
    padding: 0;
    display: flex;
    align-items: center;
  }
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .logo-area {
    padding: 4px 12px;
  }
  .app-title {
    font-size: 1.1rem;
  }
  .theme-toggle-area {
    display: flex;
    align-items: center;
  }

  /* Fixed bottom navigation bar */
  .nav-links {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    padding: 0 8px;
    gap: 0;
  }
  .nav-link {
    flex: 1;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    border-radius: 0;
    font-size: 0.72rem;
    font-weight: 500;
    background: transparent !important;
    color: var(--text-secondary);
    border-top: 3px solid transparent;
    transition: none;
  }
  .nav-link:hover {
    color: var(--text-primary);
  }
  .nav-link.active {
    color: var(--primary);
    border-top-color: var(--primary);
    font-weight: 600;
  }
  .nav-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin-bottom: 1px;
  }

  /* Horizontal scrolling filter categories */
  .filter-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-categories::-webkit-scrollbar {
    display: none;
  }
  .filter-tag {
    flex: 0 0 auto;
    padding: 6px 14px;
    font-size: 0.85rem;
  }

  /* Workspace Navigation Tabs scrolling */
  .tabs-container {
    flex-direction: row;
    justify-content: flex-start;
    position: relative;
    padding-top: 4px;
  }
  .ws-tabs {
    width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border-color);
  }
  .ws-tabs::-webkit-scrollbar {
    display: none;
  }
  .ws-tab {
    flex: 0 0 auto;
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom-width: 2px;
  }
  
  /* Progress bar formatted as a top thin highlight line */
  .ws-overall-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    padding: 0;
    margin: 0;
    border-top: none;
  }
  .ws-overall-progress .progress-info {
    display: none;
  }
  .ws-overall-progress .progress-bar-wrapper {
    width: 100%;
    height: 3px;
    border-radius: 0;
    background-color: transparent;
  }

  /* Split layout settings */
  .panel-sidebar {
    order: 2;
  }
  .notes-textarea {
    height: 160px;
  }

  /* Header Bar for Active Workspace */
  .ws-header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .ws-back-area {
    flex-grow: 1;
    min-width: 0;
  }
  .ws-title-group {
    min-width: 0;
  }
  #ws-planner-title {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .ws-actions-area {
    width: auto;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }

  .hero-section {
    padding: 30px 0;
  }
  .hero-content h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-top: 10px;
    margin-bottom: 12px;
  }
  .hero-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .mock-planner-preview {
    max-width: 100%;
  }

  /* Catalog list styling */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .search-box {
    max-width: 100%;
  }
  .templates-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Budget component cards */
  .budget-summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .budget-card-stat {
    padding: 16px;
  }
  .budget-card-stat .value {
    font-size: 1.5rem;
  }

  /* Workspace Actions to Circular Icons */
  .ws-actions-area .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .ws-actions-area .btn span {
    display: none;
  }
  .ws-actions-area .btn svg {
    margin: 0;
    width: 18px;
    height: 18px;
  }

  /* Convert budget table to responsive input cards */
  .budget-table thead {
    display: none;
  }
  .budget-table, .budget-table tbody, .budget-table tr, .budget-table td {
    display: block;
    width: 100%;
  }
  .budget-table tr {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    padding: 16px;
    position: relative;
    box-shadow: var(--shadow-sm);
  }
  .budget-table td {
    border-bottom: none;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
  }
  
  .budget-table td:nth-child(1) {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--bg-secondary);
    padding-bottom: 6px;
    margin-bottom: 8px;
  }
  .budget-table td:nth-child(1)::before {
    content: 'Khoản chi #';
    font-weight: 600;
  }
  
  .budget-table td:nth-child(2) {
    flex-direction: column;
    align-items: flex-start;
  }
  .budget-table td:nth-child(2)::before {
    content: 'Hạng mục chi phí';
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
  }
  .budget-table td:nth-child(2) input {
    width: 100%;
  }
  
  .budget-table td:nth-child(3)::before {
    content: 'Dự kiến (đ)';
    font-weight: 600;
    color: var(--text-secondary);
  }
  .budget-table td:nth-child(3) input {
    max-width: 140px;
    text-align: right;
  }
  
  .budget-table td:nth-child(4)::before {
    content: 'Thực tế (đ)';
    font-weight: 600;
    color: var(--text-secondary);
  }
  .budget-table td:nth-child(4) input {
    max-width: 140px;
    text-align: right;
  }
  
  .budget-table td:nth-child(5) {
    position: absolute;
    top: 10px;
    right: 12px;
    width: auto;
    padding: 0;
  }

  /* Timeline mobile adjustments */
  .timeline-workspace-wrapper {
    padding: 20px;
  }
  .timeline-visual::before {
    left: 14px;
  }
  .timeline-step-block {
    padding-left: 45px;
  }
  .timeline-icon-marker {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border-width: 3px;
  }
  .timeline-step-content {
    padding: 16px;
  }
  .timeline-step-content h3 {
    font-size: 1.1rem;
  }

  /* Double-column grid for products shopping lists */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .product-image-box {
    height: 120px;
    font-size: 2.2rem;
  }
  .product-info-box {
    padding: 10px;
    gap: 8px;
  }
  .product-title {
    font-size: 0.85rem;
  }
  .product-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
  }
  .product-affiliate-link {
    font-size: 0.75rem;
    padding: 6px 8px;
    width: 100%;
  }

  /* Checklist spacings */
  .checklist-group-header {
    padding: 12px 16px;
  }
  .checklist-group-header h4 {
    font-size: 0.95rem;
  }
  .group-progress-text {
    font-size: 0.75rem;
  }
  .checklist-item {
    padding: 12px 16px;
    gap: 10px;
  }
  .checklist-item-title {
    font-size: 0.9rem;
  }
  .checklist-item-desc {
    font-size: 0.75rem;
  }

  /* Custom Builder Settings & Canvas */
  .builder-header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .builder-back-area {
    flex-grow: 1;
    min-width: 0;
  }
  .builder-actions-area {
    width: auto;
  }
  .builder-actions-area .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .builder-actions-area .btn span {
    display: none;
  }
  .builder-actions-area .btn svg {
    margin: 0;
    width: 18px;
    height: 18px;
  }

  .canvas-paper {
    padding: 16px;
    min-height: 400px;
  }
  .canvas-widget-body {
    padding: 12px;
  }
  .sandbox-row {
    gap: 8px;
  }
  .btn-widget-opt {
    padding: 10px;
    gap: 10px;
  }
  .btn-widget-opt .icon {
    font-size: 1.25rem;
  }
  .btn-widget-opt .title {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   7. PRINT MEDIA STYLING
   ========================================================================== */
@media print {
  /* Hide interactive non-printing components */
  .main-header,
  .main-footer,
  .workspace-header-bar .btn-back,
  .ws-actions-area,
  .workspace-tabs-bar,
  .panel-sidebar,
  .toast-container,
  .btn-budget-add-row,
  .budget-table th:last-child,
  .budget-table td:last-child {
    display: none !important;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  /* Make inputs appear as plain text in print */
  input[type="text"], input[type="number"], textarea {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  /* Make workspace occupy full printable width */
  #view-workspace {
    display: block !important;
    opacity: 1 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .workspace-bodycontainer {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  /* Force display of all panels during printing */
  .tab-panel {
    display: block !important;
    opacity: 1 !important;
    page-break-inside: avoid;
    margin-bottom: 40px !important;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 20px;
  }
  
  .tab-panel:last-child {
    border-bottom: none;
  }

  /* Split layout full-width on print */
  .panel-layout {
    grid-template-columns: 1fr !important;
  }

  .checklist-group-card {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    margin-bottom: 20px;
  }

  .timeline-workspace-wrapper {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    padding: 20px !important;
  }

  .budget-card-stat {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
  
  .budget-summary-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    margin-bottom: 20px;
  }

  .card-table {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

