/* ═══════════════════════════════════════════════════════════
   PMG Client Weekly Update Dashboard
   Pure HTML/CSS/JS - No framework dependencies
   Mobile-first responsive design
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-muted: #65657a;
  --accent: #f97316;
  --accent-glow: rgba(249, 115, 22, 0.15);
  --accent-soft: rgba(249, 115, 22, 0.08);
  --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);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --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);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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;
}

/* ── PIN Overlay ─────────────────────────────────────────── */
.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  animation: pinFadeIn 0.4s ease;
}

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

.pin-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.pin-logo {
  height: 36px;
  width: auto;
  margin-bottom: 2rem;
  opacity: 0.9;
}

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

.pin-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.pin-input-wrap {
  display: flex;
  gap: 0.75rem;
}

.pin-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
  letter-spacing: 0.15em;
  text-align: center;
}

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

.pin-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

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

.pin-error {
  color: var(--red);
  font-size: 0.8125rem;
  margin-top: 1rem;
}

/* ── 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);
}

.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: rgba(249, 115, 22, 0.08);
}

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

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

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

/* ── Client Banner ───────────────────────────────────────── */
.client-banner {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.06) 0%, rgba(249, 115, 22, 0.02) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.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;
  padding: 0.375rem 0.75rem;
  background: var(--accent, #f97316);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  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;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.week-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.week-nav-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.week-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.week-nav-btn:disabled:hover {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border-card);
}

.week-nav-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 100px;
  text-align: center;
}

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

.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(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(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
.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(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* 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(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;
}

.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;
}

.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: 1.5rem;
}

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

.footer-logo {
  height: 20px;
  width: 20px;
  opacity: 0.5;
}

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

/* ── 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;
}

.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(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  min-width: 60px;
}

.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(255, 255, 255, 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;
}

.approval-btn:hover {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.08);
}

.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(255, 255, 255, 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;
}

@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, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.03) 100%);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.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(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(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.5625rem;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
  margin-left: 0.25rem;
  transition: all var(--transition);
}

.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: #2a2a3a;
  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.3);
  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;
}

.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: rgba(249, 115, 22, 0.08);
  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(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  transition: all var(--transition);
}

.client-task-item:hover {
  border-color: rgba(249, 115, 22, 0.15);
  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(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: rgba(34, 197, 94, 0.03);
}

/* ═══════════════════════════════════════════════════════════
   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-nav {
    align-self: flex-start;
    margin-top: 0.5rem;
  }

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

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

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

  .header-logo {
    height: 24px;
  }

  .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;
  }

  .pin-card {
    padding: 2rem 1.5rem;
  }

  .pin-input-wrap {
    flex-direction: column;
  }

  .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;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .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;
  }
}

/* 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;
}

.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(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.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;
}

/* 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);
  }
}
