/* Launchpad Blueprint - Shopify Client Resource Hub CSS */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&family=Roboto+Mono:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  /* Color Palette - Dark Header & Light Body System */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-active: #e2e8f0;

  /* Header Light Palette System */
  --header-bg: #ffffff;
  --header-top-bg: #ffffff;
  --header-text-main: #0f172a;
  --header-text-muted: #64748b;
  --header-border: #e2e8f0;

  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;

  --brand-primary: #008060; /* Shopify Emerald */
  --brand-hover: #006e52;
  --brand-light: #e6f4f0;
  --brand-lime: #84cc16;

  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-info: #3b82f6;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

html {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography Helpers */
.font-mono {
  font-family: var(--font-mono);
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

/* Dark Header & Top Sticky Bar */
.top-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--header-top-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--shadow-md);
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-logo-img {
  height: 36px;
  max-height: 42px;
  width: auto;
  object-fit: contain;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-actions .btn-outline {
  color: var(--text-main);
  border-color: var(--border-light);
  background-color: var(--bg-subtle);
}

.top-actions .btn-outline:hover {
  background-color: var(--bg-active);
  color: var(--text-main);
  border-color: var(--border-hover);
}

/* Header & Dark Navigation */
header.app-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding-top: 0.5rem;
  padding-bottom: 0;
  color: var(--header-text-main);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.header-title-area h1 {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-title-area p {
  color: var(--header-text-muted);
  font-size: 0.95rem;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pill-primary {
  background-color: rgba(132, 204, 22, 0.15);
  color: #a3e635;
  border-color: rgba(132, 204, 22, 0.3);
}

.pill-admin {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.pill-admin:hover {
  background-color: #2563eb;
  color: #ffffff;
}

.pill-admin-toggle {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.pill-admin-toggle.active {
  background-color: #3b82f6;
  color: #ffffff;
  border-color: #60a5fa;
}

/* Dark Header Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-main);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--brand-primary);
  background-color: var(--brand-light);
}

.tab-btn.active {
  color: var(--brand-primary);
  font-weight: 700;
  border-bottom-color: var(--brand-primary);
  background-color: var(--brand-light);
}

.tab-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-subtle);
  color: var(--text-muted);
}

.tab-btn.active .tab-badge {
  background-color: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
}

/* Main Layout */
main.app-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem 1rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

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

/* Dashboard Cards */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr 340px;
  }
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Overall Progress Card */
.overall-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid rgba(0, 128, 96, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .overall-hero-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-left {
  flex: 1;
}

.hero-title {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.hero-sub {
  color: var(--text-body);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

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

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

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Progress Ring Implementation (Modern & Accessible) */
@property --value {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

/* Interactive SVG Circular Progress Ring */
.progress-ring-wrapper {
  position: relative;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin: 0 auto;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-ring-wrapper:hover {
  transform: scale(1.08);
}

.progress-ring-wrapper:hover .ring-fill-circle {
  filter: drop-shadow(0 4px 10px rgba(0, 128, 96, 0.4));
}

.progress-ring-svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
  overflow: visible;
}

.ring-bg-circle {
  stroke: #e2e8f0;
  stroke-width: 10;
  fill: none;
}

.ring-fill-circle {
  stroke: url(#ringGradient);
  stroke-width: 10;
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring-center {
  position: absolute;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-percent {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.progress-ring-wrapper:hover .ring-percent {
  color: var(--brand-primary);
}

.ring-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Checklist Cards Grid */
.checklist-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .checklist-overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mini-checklist-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.mini-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mini-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.mini-card-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.35;
}

.mini-progress-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mini-prog-text {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-body);
}

.mini-prog-bar {
  height: 6px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mini-prog-fill {
  height: 100%;
  background-color: var(--brand-primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Smart Nudge Box */
.nudge-card {
  background-color: #fffbeeb0;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.nudge-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.nudge-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--text-body);
  white-space: nowrap;
}

/* Interactive Checklist Items */
.checklist-section-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.section-card-header {
  background-color: #fafafa;
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-group-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.group-progress-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-subtle);
  color: var(--text-body);
}

/* Filter Bar & Controls */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.filter-options {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.filter-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  font-family: var(--font-main);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.filter-btn.active {
  background-color: var(--brand-light);
  color: var(--brand-primary);
  border-color: rgba(0, 128, 96, 0.3);
  font-weight: 700;
}

.search-box {
  position: relative;
  min-width: 240px;
}

.search-input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.2rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: #fff;
  color: var(--text-main);
  outline: none;
}

.search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(0, 128, 96, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Checklist Item Row */
.checklist-item-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease;
}

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

.checklist-item-row:hover {
  background-color: #fdfdfd;
}

.checklist-item-row.is-completed {
  background-color: rgba(240, 253, 244, 0.4);
}

/* Custom Accessible Checkbox Target */
.checkbox-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-top: 0.15rem;
  cursor: pointer;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background-color: #fff;
  cursor: pointer;
  outline: none;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.custom-checkbox:hover {
  border-color: var(--brand-primary);
}

.custom-checkbox:focus-visible {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.25);
}

.custom-checkbox:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

.item-content-body {
  flex: 1;
}

.item-main-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.15s ease;
}

.is-completed .item-main-label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.why-text-box {
  margin-top: 0.4rem;
  font-size: 0.835rem;
  color: var(--text-body);
  background-color: var(--bg-subtle);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-warning);
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.why-icon {
  color: var(--accent-warning);
  font-weight: bold;
}

.item-actions-area {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.shopify-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--brand-primary);
  background-color: var(--brand-light);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid rgba(0, 128, 96, 0.2);
  transition: all 0.2s ease;
}

.shopify-admin-btn:hover {
  background-color: var(--brand-primary);
  color: #ffffff;
}

.sample-guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.775rem;
  font-weight: 600;
  color: #166534;
  background-color: #ecfdf5;
  padding: 0.28rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
}

.sample-guide-btn:hover {
  background-color: #d1fae5;
  color: #14532d;
  border-color: #86efac;
  box-shadow: 0 1px 4px rgba(22, 101, 52, 0.12);
}

.pdf-resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.775rem;
  font-weight: 600;
  color: #991b1b;
  background-color: #fef2f2;
  padding: 0.28rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid #fca5a5;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
}

.pdf-resource-btn:hover {
  background-color: #fee2e2;
  color: #7f1d1d;
  border-color: #f87171;
  box-shadow: 0 1px 4px rgba(153, 27, 27, 0.12);
}


/* Quill Full WYSIWYG Editor Styles */
.ql-toolbar.ql-snow {
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  border-color: var(--border-light) !important;
  background-color: var(--bg-subtle);
  font-family: var(--font-sans) !important;
}

.ql-container.ql-snow {
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  border-color: var(--border-light) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.875rem !important;
}

.ql-editor {
  min-height: 120px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
}

.ql-picker-options {
  z-index: 1000 !important;
}



/* YouTube Video Tutorial Image Button (Single Official Icon Only) */
.youtube-video-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  outline: none;
  vertical-align: middle;
}

.youtube-video-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.youtube-video-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--brand-primary);
  border-radius: 4px;
}

.yt-icon-img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* Responsive YouTube Video Modal Box */
.video-responsive-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: #000;
  margin-top: 1rem;
}

.video-responsive-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Premium Admin Data Table Styling */
.admin-table-container {
  width: 100%;
  overflow-x: auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.admin-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-body);
  vertical-align: middle;
  line-height: 1.5;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background-color: #f8fafc;
}

.admin-badge-phase {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.admin-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--brand-primary);
  background-color: var(--brand-light);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 128, 96, 0.2);
}

/* Styled Action Buttons in Admin CMS */
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.775rem;
  font-weight: 600;
  border: 1px solid var(--border-hover);
  background-color: #ffffff;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.admin-action-btn:hover {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.admin-action-btn.btn-delete {
  border-color: #fca5a5;
  background-color: #fef2f2;
  color: #dc2626;
}

.admin-action-btn.btn-delete:hover {
  background-color: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* Admin Sidebar Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  min-height: calc(100vh - 120px);
}

@media (min-width: 850px) {
  .admin-layout {
    grid-template-columns: 240px 1fr;
  }
}

.admin-sidebar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.35rem;
}

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

.admin-nav-item.active {
  background-color: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}

/* Directory / App Picks Cards */
.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.app-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.app-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.app-cat-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background-color: var(--bg-subtle);
  color: var(--text-body);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.app-blurb {
  font-size: 0.875rem;
  color: var(--text-body);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.app-why {
  font-size: 0.8rem;
  color: var(--text-muted);
  background-color: #fafafa;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-light);
  margin-bottom: 1rem;
}

.app-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
}

.app-price {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-body);
}

.app-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--brand-light);
  transition: all 0.2s ease;
}

.app-link-btn:hover {
  background-color: var(--brand-primary);
  color: #ffffff;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  padding: 1.75rem;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  margin: auto 0;
  box-sizing: border-box;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

/* macOS Minimize / Genie Closing Animation */
.modal-box.mac-minimize-anim {
  transform: translate(var(--target-x, 0px), var(--target-y, 0px)) scale(0.06) rotate(-3deg) !important;
  opacity: 0 !important;
  filter: blur(2px) !important;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease-in, filter 0.45s ease !important;
  pointer-events: none !important;
}

.modal-overlay.mac-fading-out {
  opacity: 0 !important;
  transition: opacity 0.55s ease !important;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
}

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

.modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.modal-body {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

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

.form-input, .form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  outline: none;
  background-color: #fff;
}

.form-input:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(0, 128, 96, 0.15);
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--brand-hover);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-light);
  color: var(--text-body);
}

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

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

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

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

/* Footer */
footer.app-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 2rem 1rem;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
/* First-Time Onboarding Spotlight & Tooltip Animation */
@keyframes storeBtnPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 128, 96, 0.9);
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.3);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 12px rgba(0, 128, 96, 0);
    border-color: #34d399;
    background-color: rgba(52, 211, 153, 0.45);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 128, 96, 0);
  }
}

.store-btn-spotlight {
  animation: storeBtnPulse 1.1s ease-in-out 4;
  border-color: #34d399 !important;
  color: #ffffff !important;
  position: relative;
  z-index: 50;
}

.onboarding-tooltip-badge {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 100;
  animation: tooltipBounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.onboarding-tooltip-badge::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 28px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #059669 transparent;
}

@keyframes tooltipBounceIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Comprehensive Mobile & Responsive Enhancements */
@media (max-width: 768px) {
  .top-bar-inner {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .brand-logo-img {
    height: 24px;
  }

  .top-progress-summary {
    display: none;
  }

  .top-actions {
    gap: 0.35rem;
  }

  .top-actions .btn-sm {
    padding: 0.25rem 0.45rem;
    font-size: 0.75rem;
  }

  .header-container, .main-container, .footer-inner {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  header.app-header {
    padding-top: 0.35rem;
  }

  .nav-tabs {
    gap: 0.35rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.825rem;
    flex-shrink: 0;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .filter-options {
    width: 100%;
    justify-content: space-between;
  }

  .filter-btn {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.4rem;
    font-size: 0.8rem;
  }

  .search-box {
    width: 100%;
    min-width: 0;
  }

  .checklist-section-header {
    padding: 0.85rem 1rem;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .checklist-item-row {
    padding: 0.85rem 0.75rem;
    gap: 0.65rem;
  }

  .custom-checkbox {
    width: 24px;
    height: 24px;
  }

  .item-actions-area {
    margin-top: 0.65rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .shopify-admin-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.775rem;
  }

  .yt-icon-img {
    height: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dash-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modal-content {
    padding: 1.25rem 1rem;
    width: 94%;
    max-height: 90vh;
  }

  .admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .desktop-only {
    display: none !important;
  }

  .tab-btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
  }

  .item-main-label {
    font-size: 0.9rem;
  }

  .why-text-box {
    font-size: 0.8rem;
  }
}

/* Print/PDF Export Optimization */
@media print {
  .top-sticky-bar, .nav-tabs, .filter-bar, .modal-overlay, .top-actions {
    display: none !important;
  }
  main.app-main {
    padding: 0;
  }
  .card, .checklist-section-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }
}
