/* ===================================================================
   PMG Client Weekly Update Dashboard
   Pure HTML/CSS/JS - No framework dependencies
   Mobile-first responsive design
   Light/Dark theme with CSS custom properties
   =================================================================== */

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

/* -- Theme Variables: Light (default) ------------------------------ */
:root {
  /* Immersive brand tokens (matches pmg-site-v2 warm-paper light theme) */
  --brand-orange: #f1420b;
  --brand-teal: #2a93c1;
  --brand-grad: linear-gradient(96deg, #f1420b 0%, #2a93c1 100%);
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-ui: 'Oswald', sans-serif;
  --ls-label: 0.24em;

  --bg-primary: #f5f1ea;
  --bg-secondary: #fbf7f0;
  --bg-card: #fbf7f0;
  --bg-card-hover: #f3ede2;
  --border-subtle: rgba(20, 17, 14, 0.08);
  --border-card: rgba(20, 17, 14, 0.12);
  --text-primary: #14110e;
  --text-secondary: rgba(20, 17, 14, 0.72);
  --text-muted: rgba(20, 17, 14, 0.5);
  --accent: #f1420b;
  --accent-glow: rgba(241, 66, 11, 0.15);
  --accent-soft: rgba(241, 66, 11, 0.06);
  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.08);
  --green-border: rgba(22, 163, 74, 0.2);
  --yellow: #ca8a04;
  --yellow-bg: rgba(202, 138, 4, 0.08);
  --yellow-border: rgba(202, 138, 4, 0.2);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.06);
  --red-border: rgba(220, 38, 38, 0.2);
  --blue: #2563eb;
  --blue-bg: rgba(37, 99, 235, 0.06);
  --blue-border: rgba(37, 99, 235, 0.2);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-card: 0 1px 3px rgba(20,17,14,0.05), 0 6px 18px rgba(20,17,14,0.05);
  --shadow-hover: 0 6px 22px rgba(20,17,14,0.10), 0 2px 8px rgba(20,17,14,0.06);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --theme-transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* -- Theme Variables: Dark ----------------------------------------- */
[data-theme="dark"] {
  /* Immersive cinematic near-black (matches pmg-site-v2 default dark theme) */
  --bg-primary: #000000;
  --bg-secondary: #0b0b0c;
  --bg-card: #0c0c0e;
  --bg-card-hover: #131316;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-card: rgba(255, 255, 255, 0.16);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.68);
  --text-muted: rgba(255, 255, 255, 0.5);
  --accent: #f1420b;
  --accent-glow: rgba(241, 66, 11, 0.18);
  --accent-soft: rgba(241, 66, 11, 0.1);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.1);
  --green-border: rgba(34, 197, 94, 0.25);
  --yellow: #eab308;
  --yellow-bg: rgba(234, 179, 8, 0.1);
  --yellow-border: rgba(234, 179, 8, 0.25);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --red-border: rgba(239, 68, 68, 0.25);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  --blue-border: rgba(59, 130, 246, 0.25);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.15);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.2);
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: var(--theme-transition);
}

/* -- Header -------------------------------------------------------- */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--theme-transition);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
  flex-shrink: 0;
}

.header-back-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-logo {
  height: 44px;
  width: auto;
  opacity: 0.9;
}

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

.header-updated {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-sync-info {
  font-size: 0.6875rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* -- Theme Toggle -------------------------------------------------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Show correct label per theme */
.theme-label--to-dark { display: inline; }
.theme-label--to-light { display: none; }
[data-theme="dark"] .theme-label--to-dark { display: none; }
[data-theme="dark"] .theme-label--to-light { display: inline; }

/* -- Client Banner ------------------------------------------------- */
.client-banner {
  background: linear-gradient(135deg, var(--client-accent-soft, var(--accent-soft)) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--theme-transition);
}

.client-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.client-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.client-week {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.events-dash-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, transform 0.1s;
}
.events-dash-link:hover {
  background: #ea580c;
  transform: translateY(-1px);
}
.events-dash-link svg {
  flex-shrink: 0;
}
.events-dash-link.active {
  background: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.3);
}

/* -- Embedded Events Dashboard ------------------------------------ */
.events-iframe-container {
  display: none;
  border-radius: 12px;
  margin: 0 0 1.5rem 0;
  border: 1px solid var(--border);
  background: var(--card-bg);
  overflow: hidden;
}
.events-iframe-container.open {
  display: block;
}
.events-iframe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
}
.events-iframe-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.events-iframe-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.events-iframe {
  width: 100%;
  height: 850px;
  border: none;
  display: block;
}

/* -- Week Selector (dropdown) ------------------------------------- */
.week-selector-wrap {
  display: flex;
  align-items: center;
}

.week-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  padding: 0.5rem 2rem 0.5rem 0.875rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a9ab0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  min-width: 200px;
}

.week-dropdown:hover {
  border-color: var(--accent);
}

.week-dropdown:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.week-dropdown option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* -- Tabs ---------------------------------------------------------- */
.tabs {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 52px;
  z-index: 99;
  transition: var(--theme-transition);
}

.tabs-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  position: relative;
}

.tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .tab:hover {
  background: rgba(255, 255, 255, 0.02);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

/* -- Tab Content --------------------------------------------------- */
.tab-content {
  display: none;
  animation: contentFadeIn 0.35s ease;
}

.tab-content.active {
  display: block;
}

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

.content-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* -- Cards Grid ---------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* -- Goal / Update / Achievement Card ------------------------------ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  animation: cardSlideIn 0.4s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }

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

.card:hover {
  border-color: rgba(249, 115, 22, 0.2);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover::before {
  opacity: 1;
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.card-member {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-dept {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Status Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge--green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.badge--green .badge-dot { background: var(--green); }

.badge--yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow-border);
}
.badge--yellow .badge-dot { background: var(--yellow); }

.badge--red {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}
.badge--red .badge-dot { background: var(--red); }

.badge--blue {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}
.badge--blue .badge-dot { background: var(--blue); }

.badge--neutral {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
[data-theme="dark"] .badge--neutral {
  background: rgba(255, 255, 255, 0.04);
}
.badge--neutral .badge-dot { background: var(--text-secondary); }

/* Priority Badge */
.badge-priority {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

.badge-priority--high {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.badge-priority--normal {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
[data-theme="dark"] .badge-priority--normal {
  background: rgba(255, 255, 255, 0.03);
}

/* Card Body */
.card-body {
  margin-bottom: 0.75rem;
}

.card-goals {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-goal-item {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
}

.card-goal-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.card-goal-item--completed::before {
  background: var(--green);
  opacity: 0.8;
}

.card-goal-item--completed {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.15);
}
[data-theme="dark"] .card-goal-item--completed {
  text-decoration-color: rgba(255,255,255,0.15);
}

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

.card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* -- Empty State --------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  text-align: center;
  gap: 1rem;
}

.empty-state svg {
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.875rem;
}

/* -- Summary Stats ------------------------------------------------- */
.summary {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  margin-top: 1rem;
  transition: var(--theme-transition);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: var(--theme-transition);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -- Footer -------------------------------------------------------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem 1.5rem;
  transition: var(--theme-transition);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo-full {
  height: 24px;
  width: auto;
  opacity: 0.7;
}

.footer-tagline {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

.footer-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.footer-divider {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.4;
}

.footer-update-schedule {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.footer-copyright {
  font-size: 0.6875rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* -- Review Progress Bar ------------------------------------------- */
.review-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  transition: var(--theme-transition);
}

.review-bar-icon {
  color: var(--green);
  flex-shrink: 0;
}

.review-bar-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.review-bar-count {
  color: var(--green);
  font-weight: 700;
}

.review-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  overflow: hidden;
  min-width: 60px;
}
[data-theme="dark"] .review-bar-track {
  background: rgba(255, 255, 255, 0.06);
}

.review-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* -- Approval Checkmark (per goal item) ---------------------------- */
.goal-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.goal-row .card-goal-item {
  flex: 1;
  min-width: 0;
}

.approval-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 0.1em;
  transition: all var(--transition);
  color: transparent;
}
[data-theme="dark"] .approval-btn {
  border-color: rgba(255, 255, 255, 0.15);
}

.approval-btn:hover {
  border-color: var(--green);
  background: var(--green-bg);
}

.approval-btn.approved {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.approval-btn.approved:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.approval-btn svg {
  width: 14px;
  height: 14px;
}

/* Reviewed item visual state */
.goal-row.reviewed .card-goal-item {
  opacity: 0.6;
}

.goal-row.reviewed {
  border-left: 2px solid var(--green);
  padding-left: 0.5rem;
  margin-left: -0.5rem;
  border-radius: 2px;
}

/* -- Comment System ------------------------------------------------ */
.card-comments-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.card-comments-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.card-comments-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-comments-badge {
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

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

.comment-item {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.625rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary);
  animation: commentFadeIn 0.25s ease;
}
[data-theme="dark"] .comment-item {
  background: rgba(255, 255, 255, 0.02);
}

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

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
}

.comment-author {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.comment-text {
  color: var(--text-secondary);
  word-break: break-word;
}

/* Add comment toggle link */
.add-comment-toggle {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.add-comment-toggle:hover {
  color: var(--accent);
}

.add-comment-toggle svg {
  width: 14px;
  height: 14px;
}

/* Comment input area */
.comment-input-area {
  display: none;
  margin-top: 0.375rem;
}

.comment-input-area.visible {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.comment-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  resize: none;
  min-height: 48px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color var(--transition);
}

.comment-input::placeholder {
  color: var(--text-muted);
}

.comment-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.comment-submit-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  width: 32px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.comment-submit-btn:hover {
  background: #ea6c0a;
  transform: translateY(-1px);
}

.comment-submit-btn:active {
  transform: translateY(0);
}

.comment-submit-btn svg {
  width: 16px;
  height: 16px;
}

/* -- Welcome Banner ------------------------------------------------ */
.welcome-banner {
  background: linear-gradient(135deg, var(--green-bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--green-border);
  transition: var(--theme-transition);
}

.welcome-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.welcome-icon {
  color: var(--green);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.welcome-text {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.welcome-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.welcome-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.welcome-close:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .welcome-close:hover {
  background: rgba(255, 255, 255, 0.05);
}

.welcome-banner.hidden {
  display: none;
}

/* -- "Needs Your Approval" Badge ----------------------------------- */
.approval-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(249, 115, 22, 0.12);
  color: var(--accent);
  border: 1px solid rgba(249, 115, 22, 0.25);
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* -- Help Tooltip -------------------------------------------------- */
.approval-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  font-size: 0.5625rem;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
  margin-left: 0.25rem;
  transition: all var(--transition);
}
[data-theme="dark"] .approval-help {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.approval-help:hover {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
  color: var(--accent);
}

.approval-help::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.4rem 0.625rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid var(--border-card);
  z-index: 10;
}

.approval-help:hover::after {
  opacity: 1;
}

/* -- Client Tasks: Approval Section -------------------------------- */
.client-tasks-section {
  background: var(--bg-card);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  animation: contentFadeIn 0.35s ease;
  transition: var(--theme-transition);
}

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

.client-tasks-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.client-tasks-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.client-tasks-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.client-tasks-counter {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--accent-soft);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  flex-shrink: 0;
}

.client-tasks-counter-num {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.client-tasks-counter-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.client-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Individual approval task item */
.client-task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  transition: all var(--transition);
}
[data-theme="dark"] .client-task-item {
  background: rgba(255, 255, 255, 0.02);
}

.client-task-item:hover {
  border-color: rgba(249, 115, 22, 0.15);
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .client-task-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.client-task-item.task-approved {
  border-color: var(--green-border);
  background: var(--green-bg);
  opacity: 0.7;
}

.client-task-item .approval-btn {
  margin-top: 0.05em;
}

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

.client-task-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.client-task-item.task-approved .client-task-text {
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.15);
}
[data-theme="dark"] .client-task-item.task-approved .client-task-text {
  text-decoration-color: rgba(255,255,255,0.15);
}

.client-task-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.client-task-member {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.client-task-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.client-task-dept {
  font-size: 0.625rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Client task status badges */
.client-task-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.client-task-status--action-needed {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.client-task-status--awaiting-review {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow-border);
}

.client-task-feedback {
  margin-top: 0.5rem;
}

.client-task-feedback-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  resize: none;
  min-height: 36px;
  max-height: 80px;
  line-height: 1.5;
  transition: border-color var(--transition);
}

.client-task-feedback-input::placeholder {
  color: var(--text-muted);
}

.client-task-feedback-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* "All approved" done state */
.client-tasks-done {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem;
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 500;
}

.client-tasks-done svg {
  flex-shrink: 0;
}

.client-tasks-section.all-done {
  border-color: var(--green-border);
  border-left-color: var(--green);
  background: var(--green-bg);
}

/* ===================================================================
   Responsive Design (Mobile-First Breakpoints)
   =================================================================== */

/* Tablet and below */
@media (max-width: 768px) {
  .client-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1rem;
  }

  .client-name {
    font-size: 1.375rem;
  }

  .week-selector-wrap {
    width: 100%;
  }

  .week-dropdown {
    width: 100%;
    font-size: 0.8125rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-inner {
    padding: 0.75rem 1rem;
  }

  .header-logo {
    height: 24px;
  }

  .header-meta {
    gap: 0.5rem;
  }

  .header-sync-info {
    display: none;
  }

  .content-inner {
    padding: 1.5rem 1rem;
  }

  .tabs-inner {
    padding: 0 0.5rem;
  }

  .tab {
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
  }

  .tab-icon {
    display: none;
  }

  .card {
    padding: 1.25rem;
  }

  .review-bar {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }

  .review-bar-track {
    flex-basis: 100%;
    order: 3;
  }

  .comment-input-area.visible {
    flex-direction: column;
    align-items: stretch;
  }

  .comment-submit-btn {
    width: 100%;
    height: 32px;
  }

  .welcome-banner-inner {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .welcome-text {
    font-size: 0.8125rem;
  }

  .approval-help::after {
    left: auto;
    right: -4px;
    transform: none;
  }

  .client-tasks-section {
    padding: 1rem 1.125rem;
  }

  .client-tasks-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .client-tasks-counter {
    margin-left: 0;
  }

  .client-task-item {
    padding: 0.75rem 0.875rem;
  }

  .client-task-meta {
    flex-wrap: wrap;
  }

  .footer-brand {
    flex-direction: column;
    gap: 0.375rem;
  }

  .footer-logo-full {
    height: 20px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }
}

/* Small phones */
@media (max-width: 400px) {
  html {
    font-size: 16px;
  }

  .client-name {
    font-size: 1.125rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .card-goal-item {
    font-size: 0.8rem;
  }

  .tab {
    padding: 0.625rem 0.625rem;
    font-size: 0.75rem;
  }

  .footer {
    padding: 1.5rem 1rem 1rem;
  }
}

/* Desktop wide */
@media (min-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================================================================
   Client Selector Landing Page
   =================================================================== */

.client-selector {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.selector-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--theme-transition);
}

.selector-logo {
  height: 28px;
  width: auto;
  opacity: 0.9;
}

.selector-content {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.selector-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.selector-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.selector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.selector-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.selector-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.selector-card:hover .selector-card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.selector-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

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

.selector-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.selector-card-weeks {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.selector-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}

/* Inactive / Coming Soon clients */
.selector-inactive {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.selector-inactive-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.selector-inactive-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.selector-inactive-item {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
[data-theme="dark"] .selector-inactive-item {
  background: rgba(255, 255, 255, 0.03);
}

.selector-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: var(--theme-transition);
}

/* Selector responsive */
@media (max-width: 768px) {
  .selector-content {
    padding: 2rem 1rem 1.5rem;
  }

  .selector-title {
    font-size: 1.5rem;
  }

  .selector-card {
    padding: 1rem 1.125rem;
  }

  .selector-card-icon {
    width: 38px;
    height: 38px;
    font-size: 0.8125rem;
  }
}

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

/* -- Loading State ------------------------------------------------- */
.dashboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* -- Smooth page load --------------------------------------------- */
.dashboard {
  animation: dashboardFadeIn 0.4s ease;
}

@keyframes dashboardFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===================================================================
   Feature: Client Logo + Brand Colors
   =================================================================== */

.header-client-logo {
  height: 36px;
  width: auto;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-subtle);
  object-fit: contain;
}

/* Client accent applied to banner via original .client-banner rule above */

/* ===================================================================
   Feature: KPI Metrics Cards
   =================================================================== */

.metrics-section {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  transition: var(--theme-transition);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

/* Nested category layout for grouped metrics */
.metrics-grid:has(.metric-category) {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.metric-category {
  width: 100%;
}

.metric-category-header {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.metric-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.metric-note {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.metric-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.metric-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.375rem;
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.metric-change svg {
  flex-shrink: 0;
}

.metric-trend--up {
  color: var(--green);
}

.metric-trend--down {
  color: var(--red);
}

.metric-trend--neutral {
  color: var(--text-muted);
}

.metric-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
[data-theme="dark"] .metric-bar {
  background: rgba(255, 255, 255, 0.06);
}

.metric-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-bar-fill.metric-trend--up {
  background: var(--green);
}

.metric-bar-fill.metric-trend--down {
  background: var(--red);
}

.metric-bar-fill.metric-trend--neutral {
  background: var(--text-muted);
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .metric-category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .metric-card {
    padding: 0.75rem;
  }
  .metric-value {
    font-size: 1.25rem;
  }
}

/* ===================================================================
   Feature: Screenshots Gallery
   =================================================================== */

.screenshots-section {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  transition: var(--theme-transition);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.screenshot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.screenshot-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--client-accent, var(--accent));
}

.screenshot-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-primary);
}

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

.screenshot-card:hover .screenshot-img {
  transform: scale(1.03);
}

.screenshot-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s ease;
  color: #fff;
}

.screenshot-card:hover .screenshot-overlay {
  opacity: 1;
}

.screenshot-info {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.screenshot-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.screenshot-category {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--client-accent-soft, var(--accent-soft));
  color: var(--client-accent, var(--accent));
  border: 1px solid var(--client-accent-glow, var(--accent-glow));
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   Feature: Lightbox Modal
   =================================================================== */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

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

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

/* ===================================================================
   Feature: Portal Comments Section
   =================================================================== */

.portal-comments-section {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  padding-bottom: 1rem;
  transition: var(--theme-transition);
}

.portal-comments-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--theme-transition);
}

.portal-comments-input-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-comment-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.portal-comment-author {
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  width: 100%;
  max-width: 320px;
  transition: border-color var(--transition);
}

.portal-comment-author::placeholder {
  color: var(--text-muted);
}

.portal-comment-author:focus {
  border-color: var(--client-accent, var(--accent));
  box-shadow: 0 0 0 2px var(--client-accent-glow, var(--accent-glow));
}

.portal-comment-text {
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  width: 100%;
  min-height: 100px;
  max-height: 240px;
  line-height: 1.6;
  transition: border-color var(--transition);
}

.portal-comment-text::placeholder {
  color: var(--text-muted);
}

.portal-comment-text:focus {
  border-color: var(--client-accent, var(--accent));
  box-shadow: 0 0 0 2px var(--client-accent-glow, var(--accent-glow));
}

.portal-comment-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  margin-top: 0.5rem;
  background: var(--client-accent, var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
}

.portal-comment-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.portal-comment-submit:active {
  transform: translateY(0);
}

.portal-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.portal-comments-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-md);
}

.portal-comment-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: var(--theme-transition);
  animation: commentFadeIn 0.25s ease;
}

.portal-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.portal-comment-author-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--client-accent, var(--accent));
}

.portal-comment-timestamp {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.portal-comment-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

@media (max-width: 768px) {
  .portal-comment-author {
    max-width: 100%;
  }
}

/* ===================================================================
   Feature: Welcome Video Placeholder
   =================================================================== */

.video-welcome {
  background: linear-gradient(135deg, var(--blue-bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--blue-border);
  transition: var(--theme-transition);
}

.video-welcome-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.video-welcome-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.video-welcome-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.video-welcome-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.video-welcome-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.video-welcome-dismiss:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .video-welcome-dismiss:hover {
  background: rgba(255, 255, 255, 0.05);
}

.video-player {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

.welcome-video-player {
  width: 100%;
  max-height: 400px;
  display: block;
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .video-welcome-inner {
    padding: 1rem;
  }

  .welcome-video-player {
    max-height: 260px;
  }
}

/* ===================================================================
   TRELLO BOARD - Kanban-style display
   =================================================================== */

/* -- Board Container ------------------------------------------------- */
.trello-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
  min-height: 200px;
}

.trello-board::-webkit-scrollbar {
  height: 6px;
}

.trello-board::-webkit-scrollbar-track {
  background: transparent;
}

.trello-board::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 3px;
}

/* -- Loading State --------------------------------------------------- */
.trello-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  width: 100%;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.trello-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-card);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: trelloSpin 0.8s linear infinite;
}

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

/* -- Error State ----------------------------------------------------- */
.trello-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.875rem;
}

.trello-error svg {
  color: var(--red);
  opacity: 0.6;
}

.trello-retry-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.trello-retry-btn:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

/* -- Empty State ----------------------------------------------------- */
.trello-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* -- List Column ----------------------------------------------------- */
.trello-list {
  flex-shrink: 0;
  width: 280px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  animation: trelloListSlideIn 0.35s ease forwards;
}

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

.trello-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.trello-list-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.trello-list-count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.trello-list-cards {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

.trello-list-cards::-webkit-scrollbar {
  width: 4px;
}

.trello-list-cards::-webkit-scrollbar-track {
  background: transparent;
}

.trello-list-cards::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 2px;
}

/* -- Card ------------------------------------------------------------ */
.trello-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.trello-card:hover {
  border-color: rgba(249, 115, 22, 0.25);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.trello-card.has-desc {
  cursor: pointer;
}

.trello-card-empty {
  padding: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* -- Card Labels ----------------------------------------------------- */
.trello-card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.trello-label {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}

/* -- Card Name ------------------------------------------------------- */
.trello-card-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

/* -- Card Meta (due date) ------------------------------------------- */
.trello-card-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.trello-card-due {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.trello-card-due::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.trello-card-due.due-soon {
  color: var(--yellow);
  border-color: var(--yellow-border);
  background: var(--yellow-bg);
}

.trello-card-due.due-soon::before {
  background: var(--yellow);
}

.trello-card-due.overdue {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-bg);
}

.trello-card-due.overdue::before {
  background: var(--red);
}

/* -- Card Description (expandable) ---------------------------------- */
.trello-card-desc {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.trello-card-desc-preview {
  display: block;
}

.trello-card-desc-full {
  display: none;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

.trello-card-desc-full::-webkit-scrollbar {
  width: 3px;
}

.trello-card-desc-full::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 2px;
}

.trello-card.expanded .trello-card-desc-preview {
  display: none;
}

.trello-card.expanded .trello-card-desc-full {
  display: block;
}

.trello-card-expand-hint {
  margin-top: 0.375rem;
  font-size: 0.625rem;
  color: var(--text-muted);
  font-style: italic;
  transition: color var(--transition);
}

.trello-card.expanded .trello-card-expand-hint {
  display: none;
}

.trello-card:hover .trello-card-expand-hint {
  color: var(--accent);
}

/* -- Trello Mobile Responsive ---------------------------------------- */
@media (max-width: 768px) {
  .trello-board {
    flex-direction: column;
    overflow-x: visible;
    gap: 0.75rem;
  }

  .trello-list {
    width: 100%;
    max-height: none;
  }

  .trello-list-cards {
    max-height: 400px;
  }
}

@media (max-width: 400px) {
  .trello-list-header {
    padding: 0.75rem 0.75rem;
  }

  .trello-card {
    padding: 0.625rem;
  }
}

/* ===================================================================
   IMMERSIVE BRAND LAYER
   Matches pmg-site-v2.pages.dev: Fraunces display voice, Oswald UI
   labels, brand orange/teal, gradient-fill CTA. Additive only - keys
   off existing classes; no DOM ids/classes/data-attrs are touched.
   =================================================================== */

/* Fraunces serif display voice on the primary client headline */
.client-name {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* Oswald UI voice on section + card headings */
.section-title,
.metric-value,
.stat-number {
  font-family: var(--font-ui);
  letter-spacing: -0.01em;
}
.stat-number { font-weight: 600; }

/* Oswald uppercase eyebrow treatment on the small labels */
.stat-label,
.metric-label,
.metric-category-header .section-title,
.section-desc {
  font-family: var(--font-ui);
}
.stat-label,
.metric-label {
  letter-spacing: var(--ls-label);
  font-weight: 500;
}

/* Brand-gradient accent bar left of section titles + welcome banner */
.welcome-banner-inner .welcome-icon {
  color: var(--brand-orange);
}

/* Signature gradient-fill CTA: the sweep-up brand gradient on hover */
.comment-submit-btn {
  position: relative;
  overflow: hidden;
  background: var(--brand-orange);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow var(--transition);
}
.comment-submit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--brand-grad);
  transform: translateY(101%);
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.comment-submit-btn svg { position: relative; z-index: 1; }
.comment-submit-btn:hover { background: var(--brand-orange); }
.comment-submit-btn:hover::before { transform: translateY(0); }

/* Cards lean into the immersive card gradient + hairline border */
.stat-card,
.metric-card {
  border: 1px solid var(--border-card);
}

/* Selection + focus tints in brand orange */
::selection { background: var(--brand-orange); color: #fff; }

/* Header logo sizing stays crisp on the cinematic bg */
[data-theme="dark"] .header-logo { filter: none; }
