/* ===================================================================
   PMG Client Weekly Update Dashboard - v3.0 Luxury Polish
   Pure HTML/CSS/JS - No framework dependencies
   Mobile-first responsive design
   Light/Dark theme with CSS custom properties
   Design language: puremarketing.ai (minimalistic, luxury, cinematic)
   =================================================================== */

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

/* -- Theme Variables: Light (default) ------------------------------ */
:root {
  --bg-primary: #f7f7f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --border-subtle: rgba(0, 0, 0, 0.04);
  --border-card: rgba(0, 0, 0, 0.07);
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;
  --accent: #f1420b;
  --accent-glow: rgba(241, 66, 11, 0.12);
  --accent-soft: rgba(241, 66, 11, 0.04);
  --brand-blue: #2a93c1;
  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.06);
  --green-border: rgba(22, 163, 74, 0.12);
  --yellow: #ca8a04;
  --yellow-bg: rgba(202, 138, 4, 0.06);
  --yellow-border: rgba(202, 138, 4, 0.12);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.05);
  --red-border: rgba(220, 38, 38, 0.12);
  --blue: #2563eb;
  --blue-bg: rgba(37, 99, 235, 0.05);
  --blue-border: rgba(37, 99, 235, 0.12);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 2px 8px rgba(0,0,0,0.06);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Oswald', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  --sidebar-width: 240px;
}

/* -- Theme Variables: Dark ----------------------------------------- */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-card: rgba(255, 255, 255, 0.06);
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #f1420b;
  --accent-glow: rgba(241, 66, 11, 0.12);
  --accent-soft: rgba(241, 66, 11, 0.06);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.08);
  --green-border: rgba(34, 197, 94, 0.15);
  --yellow: #eab308;
  --yellow-bg: rgba(234, 179, 8, 0.08);
  --yellow-border: rgba(234, 179, 8, 0.15);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.08);
  --red-border: rgba(239, 68, 68, 0.15);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.08);
  --blue-border: rgba(59, 130, 246, 0.15);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-hover: 0 2px 8px rgba(0,0,0,0.3);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

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

/* -- Headings (Oswald) --------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

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

[data-theme="dark"] .header {
  background: rgba(17, 17, 17, 0.9);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 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: 36px;
  width: auto;
  opacity: 0.85;
}

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

.header-updated {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

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

/* -- WGG Overview Admin Link --------------------------------------- */
.header-wgg-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.header-wgg-link:hover {
  color: var(--accent);
  border-color: rgba(241, 66, 11, 0.2);
  background: var(--accent-soft);
}

/* -- Sidebar Toggle Button ----------------------------------------- */
.sidebar-toggle {
  display: none; /* Hidden on desktop, shown on mobile */
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  color: var(--accent);
  border-color: rgba(241, 66, 11, 0.2);
}

.sidebar-toggle--active {
  color: var(--accent);
  border-color: rgba(241, 66, 11, 0.2);
  background: var(--accent-soft);
}

/* -- Theme Toggle -------------------------------------------------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.theme-toggle:hover {
  color: var(--text-secondary);
  border-color: var(--border-card);
}

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

/* ===================================================================
   LOGIN PAGE (SSO + Email/Password + Token)
   =================================================================== */

.login-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.login-page[hidden] {
  display: none;
}

.login-page-bg {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: -1;
}

/* Subtle animated gradient accent */
.login-page-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(100deg, #2a93c1 0%, #fff 50%, #f1420b 100%);
  opacity: 0.6;
}

.login-page-bg::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(42, 147, 193, 0.04) 0%, transparent 100%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: loginFadeIn 0.4s ease-out;
}

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

.login-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  height: 32px;
  width: auto;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.login-gradient-line {
  height: 1px;
  width: 48px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(100deg, #2a93c1, #f1420b);
  border-radius: 1px;
  opacity: 0.5;
}

.login-title {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 1.625rem;
  font-weight: 600;
  color: #f0f0f0;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.8125rem;
  color: #999999;
  line-height: 1.5;
}

/* Google SSO Section */
.login-sso-section {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-google-btn-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.login-google-fallback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  max-width: 320px;
  padding: 0.75rem 1.25rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #f0f0f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-google-fallback-btn:hover {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.12);
}

.login-google-icon {
  flex-shrink: 0;
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.login-divider-text {
  font-size: 0.6875rem;
  color: #666666;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.login-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: #999999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-input {
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  color: #f0f0f0;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input::placeholder {
  color: #666666;
}

.login-input:focus {
  border-color: #2a93c1;
  box-shadow: 0 0 0 2px rgba(42, 147, 193, 0.12);
}

.login-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  color: #ef4444;
  line-height: 1.4;
  animation: loginShake 0.35s ease;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.login-submit-btn {
  background: #f1420b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

.login-submit-btn:hover {
  background: #d93a09;
  box-shadow: 0 2px 12px rgba(241, 66, 11, 0.25);
}

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

/* Token Section */
.login-token-section {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-token-toggle {
  background: none;
  border: none;
  color: #666666;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0.375rem 0.5rem;
}

.login-token-toggle:hover,
.login-token-toggle.active {
  color: #2a93c1;
}

.login-token-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.login-token-form[hidden] {
  display: none;
}

.login-token-form .login-input {
  flex: 1;
  font-size: 0.8125rem;
  padding: 0.625rem 0.75rem;
}

.login-token-btn {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #f0f0f0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.login-token-btn:hover {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Login Footer */
.login-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.login-footer p {
  font-size: 0.6875rem;
  color: #666666;
}

.login-footer a {
  color: #2a93c1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-footer a:hover {
  color: #3ba8d6;
  text-decoration: underline;
}

/* Header Auth Elements */
.header-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.625rem;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
}

.header-user-name {
  color: var(--text-primary);
  font-weight: 600;
}

.header-user-role {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.5625rem;
}

.header-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  transition: all var(--transition);
  flex-shrink: 0;
}

.header-logout-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.04);
}

.header-logout-btn svg {
  flex-shrink: 0;
}

/* Login Page - Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 8px;
  }

  .login-title {
    font-size: 1.375rem;
  }

  .login-token-form {
    flex-direction: column;
  }
}

/* ===================================================================
   ACCESS GATE (Token Authentication - Legacy)
   =================================================================== */

.access-gate {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 2rem;
}
.access-gate:not([hidden]) {
  display: flex;
}

.access-gate-inner {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.access-gate-logo {
  height: 36px;
  width: auto;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.access-gate-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.access-gate-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.access-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.access-gate-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.access-gate-input {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-card);
}

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

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

.access-gate-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);
  letter-spacing: 0.02em;
}

.access-gate-btn:hover {
  background: #d93a09;
  box-shadow: 0 2px 12px rgba(241, 66, 11, 0.25);
}

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

.access-gate-contact {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.access-gate-contact a {
  color: var(--accent);
  text-decoration: none;
}

.access-gate-contact a:hover {
  text-decoration: underline;
}

/* ===================================================================
   MAIN LAYOUT: Sidebar + Content
   =================================================================== */

.main-layout {
  display: flex;
  min-height: calc(100vh - 52px);
}

/* -- Left Sidebar -------------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  transition: var(--theme-transition);
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
  z-index: 50;
}

.sidebar::-webkit-scrollbar {
  width: 3px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

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

.sidebar-inner {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-section-title {
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Sidebar Quick Links */
.sidebar-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.625rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition);
}

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

.sidebar-link-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color var(--transition);
}

.sidebar-link:hover .sidebar-link-icon {
  color: var(--accent);
}

.sidebar-link-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Social Profiles */
.sidebar-social-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.625rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar-social-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-social-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition);
}

.sidebar-social-link:hover svg {
  color: var(--accent);
}

/* Sidebar Week Dropdown */
.sidebar-section .week-dropdown {
  width: 100%;
  min-width: 0;
}

/* -- Content Area -------------------------------------------------- */
.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* -- 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.625rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.client-week {
  font-size: 0.8125rem;
  color: var(--text-muted);
  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.35rem 0.75rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}
.events-dash-link:hover {
  background: #d93a09;
}
.events-dash-link svg {
  flex-shrink: 0;
}
.events-dash-link.active {
  background: #d93a09;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

/* -- Embedded Events Dashboard ------------------------------------ */
.events-iframe-container {
  display: none;
  border-radius: 8px;
  margin: 0 0 1.5rem 0;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  overflow: hidden;
}
.events-iframe-container.open {
  display: block;
}
.events-iframe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.events-iframe-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.events-iframe-close:hover {
  background: rgba(255, 255, 255, 0.15);
}
.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.8125rem;
  font-weight: 500;
  font-family: var(--font);
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  outline: none;
  cursor: pointer;
  transition: border-color 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(--text-muted);
}

.week-dropdown:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px 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: 40;
  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.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.01em;
}

.tab:hover {
  color: var(--text-secondary);
}

[data-theme="dark"] .tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

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

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

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

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

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

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

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

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

/* -- Cards Grid (legacy, still used for fallback) ------------------ */
.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(8px);
  animation: cardSlideIn 0.35s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.03s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.09s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.15s; }
.card:nth-child(6) { animation-delay: 0.18s; }

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

.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(100deg, #2a93c1 0%, #f1420b 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

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

/* 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: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

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

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

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

.badge-dot {
  width: 5px;
  height: 5px;
  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.02);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
[data-theme="dark"] .badge--neutral {
  background: rgba(255, 255, 255, 0.03);
}
.badge--neutral .badge-dot { background: var(--text-muted); }

/* Priority Badge */
.badge-priority {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 0.375rem;
}

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

/* 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.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

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

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

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

/* 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.6875rem;
  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.2;
}

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

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

.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: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-heading);
}

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

/* -- 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: 20px;
  width: auto;
  opacity: 0.5;
}

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

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

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

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

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

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

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

/* -- Review Progress Bar ------------------------------------------- */
.review-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.875rem;
  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.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

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

.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: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 0.15em;
  transition: all var(--transition);
  color: transparent;
}
[data-theme="dark"] .approval-btn {
  border-color: rgba(255, 255, 255, 0.1);
}

.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: 12px;
  height: 12px;
}

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

.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.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-comments-badge {
  background: rgba(241, 66, 11, 0.08);
  color: var(--accent);
  font-size: 0.5625rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(241, 66, 11, 0.12);
}

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

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

@keyframes commentFadeIn {
  from { opacity: 0; transform: translateY(3px); }
  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.5625rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comment-time {
  font-size: 0.5625rem;
  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.6875rem;
  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: 12px;
  height: 12px;
}

/* 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.5rem 0.625rem;
  font-size: 0.75rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  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: 28px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.comment-submit-btn:hover {
  background: #d93a09;
}

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

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

/* -- Welcome Banner ------------------------------------------------ */
.welcome-banner {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--theme-transition);
}

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

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

.welcome-text {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.welcome-text strong {
  color: var(--text-secondary);
  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;
  opacity: 0.5;
}

.welcome-close:hover {
  color: var(--text-primary);
  opacity: 1;
}
[data-theme="dark"] .welcome-close:hover {
  color: var(--text-primary);
}

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

/* -- "Needs Your Approval" Badge ----------------------------------- */
.approval-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(241, 66, 11, 0.08);
  color: var(--accent);
  border: 1px solid rgba(241, 66, 11, 0.15);
  margin-left: 0.375rem;
  white-space: nowrap;
}

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

.approval-help:hover {
  border-color: rgba(241, 66, 11, 0.2);
  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.625rem;
  font-weight: 500;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  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 var(--border-card);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  animation: contentFadeIn 0.3s 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: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.client-tasks-subtitle {
  font-size: 0.6875rem;
  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(241, 66, 11, 0.1);
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  flex-shrink: 0;
}

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

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

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

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

.client-task-item:hover {
  border-color: var(--border-card);
}
[data-theme="dark"] .client-task-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

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

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

.client-task-text {
  font-size: 0.8125rem;
  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.1);
}
[data-theme="dark"] .client-task-item.task-approved .client-task-text {
  text-decoration-color: rgba(255,255,255,0.1);
}

.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.625rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

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

/* Client task status badges */
.client-task-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  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.4rem 0.625rem;
  font-size: 0.6875rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  resize: none;
  min-height: 32px;
  max-height: 72px;
  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: 0.75rem;
  color: var(--green);
  font-size: 0.8125rem;
  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);
}

/* ===================================================================
   WEEKLY GOALS TABLE (Spreadsheet View)
   =================================================================== */

.goals-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.goals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.goals-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.goals-table thead th {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-card);
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.goals-table tbody tr {
  transition: background var(--transition);
}

.goals-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.goals-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.01);
}

[data-theme="dark"] .goals-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.goals-table tbody tr:nth-child(even):hover {
  background: var(--bg-card-hover);
}

.goals-table tbody tr.row-completed {
  opacity: 0.5;
}

.goals-table tbody td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  line-height: 1.5;
  vertical-align: top;
}

.goals-table-dept {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--accent-soft);
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  min-width: 140px;
}

.goals-table-member {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 120px;
}

.goals-table-goal {
  min-width: 250px;
}

.goals-table-status {
  white-space: nowrap;
  min-width: 100px;
}

.goals-table-priority {
  white-space: nowrap;
  min-width: 80px;
}

.priority-normal {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ===================================================================
   ACHIEVEMENTS TIMELINE
   =================================================================== */

.achievements-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.achievements-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-card);
}

.achievement-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
  opacity: 0;
  transform: translateX(-8px);
  animation: achievementSlideIn 0.35s ease forwards;
}

@keyframes achievementSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.achievement-marker {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -2rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 3px var(--bg-primary);
}

.achievement-content {
  flex: 1;
  min-width: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

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

.achievement-date {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.achievement-dept {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(241, 66, 11, 0.1);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.achievement-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  font-family: var(--font);
}

.achievement-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.375rem;
}

/* ===================================================================
   ABOUT PMG TAB
   =================================================================== */

.about-hero {
  text-align: center;
  padding: 2.5rem 0 3rem;
}

.about-hero-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.about-hero-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.about-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.08);
}

.about-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid rgba(241, 66, 11, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1rem;
}

.about-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.about-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Referral Section */
.about-referral {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.about-referral-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.about-referral-header svg {
  flex-shrink: 0;
  color: var(--accent);
}

.about-referral-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.about-referral-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.referral-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.referral-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.referral-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.referral-field--full {
  grid-column: 1 / -1;
}

.referral-field label {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.referral-field input,
.referral-field textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

.referral-field input::placeholder,
.referral-field textarea::placeholder {
  color: var(--text-muted);
}

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

.referral-field textarea {
  resize: vertical;
  min-height: 48px;
}

.referral-submit {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.referral-submit:hover {
  background: #d93a09;
  box-shadow: 0 2px 8px rgba(241, 66, 11, 0.2);
}

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

.referral-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  color: var(--green);
  font-size: 0.8125rem;
  font-weight: 500;
  animation: commentFadeIn 0.2s ease;
}

/* ===================================================================
   TIME & BILLING TAB
   =================================================================== */

.billing-invoice-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.billing-invoice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.billing-invoice-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.billing-invoice-period {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.billing-invoice-details {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.billing-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.billing-detail:last-child {
  border-bottom: none;
}

.billing-detail-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.billing-detail-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.billing-detail-value--green {
  color: var(--green);
}

/* Time Report Table */
.billing-time-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.billing-time-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.billing-time-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.billing-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.billing-table thead th {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-card);
  padding: 0.5rem 0.875rem;
  text-align: left;
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.billing-table tbody td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.billing-table-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem 1rem !important;
}

.billing-time-note {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.billing-time-note a {
  color: var(--accent);
  text-decoration: none;
}

.billing-time-note a:hover {
  text-decoration: underline;
}

/* ===================================================================
   CHAT BUBBLE & CHAT PANEL
   =================================================================== */

.chat-bubble {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(241, 66, 11, 0.2);
  transition: all var(--transition);
  z-index: 200;
  border: none;
  animation: none;
}

.chat-bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(241, 66, 11, 0.3);
}

.chat-bubble--open {
  background: #d93a09;
}

.chat-bubble-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* Chat Panel */
.chat-panel {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 340px;
  max-height: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  flex-direction: column;
  z-index: 201;
  overflow: hidden;
  animation: chatPanelSlideUp 0.25s ease;
}

.chat-panel:not([hidden]) {
  display: flex;
}

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

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  flex-shrink: 0;
}

.chat-panel-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.chat-panel-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 0.15s ease;
}

.chat-panel-close:hover {
  color: var(--text-primary);
}

.chat-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  max-height: 300px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

.chat-panel-messages::-webkit-scrollbar {
  width: 3px;
}

.chat-panel-messages::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 2px;
}

.chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 120px;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 2rem 1rem;
}

.chat-message {
  animation: commentFadeIn 0.2s ease;
}

.chat-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

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

.chat-message-time {
  font-size: 0.5625rem;
  color: var(--text-muted);
}

.chat-message-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.625rem;
}

.chat-confirm {
  text-align: center;
  font-size: 0.6875rem;
  color: var(--green);
  font-weight: 500;
  padding: 0.4rem;
  background: var(--green-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--green-border);
  animation: commentFadeIn 0.2s ease;
}

.chat-panel-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.chat-panel-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.625rem;
  font-size: 0.75rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  resize: none;
  min-height: 36px;
  max-height: 72px;
  line-height: 1.4;
  transition: border-color var(--transition);
}

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

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

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

.chat-panel-send:hover {
  background: #d93a09;
}

.chat-panel-send:active {
  transform: translateY(0);
}

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

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

/* ===================================================================
   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.6875rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--brand-blue);
  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.625rem;
  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;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.metric-card:hover {
  box-shadow: var(--shadow-hover);
}

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

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

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  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: 3px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 2px;
  overflow: hidden;
}
[data-theme="dark"] .metric-bar {
  background: rgba(255, 255, 255, 0.04);
}

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

/* ===================================================================
   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);
  border-color: var(--client-accent, rgba(255,255,255,0.1));
}

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

.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.2s ease;
  color: #fff;
}

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

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

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

.screenshot-category {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  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;
}

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

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s 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.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  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.15);
}

.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 4px 24px rgba(0, 0, 0, 0.4);
}

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

/* ===================================================================
   Feature: Portal Comments Section (Legacy - kept for backward compat)
   =================================================================== */

.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.75rem;
  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.625rem 0.875rem;
  font-size: 0.875rem;
  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.75rem 0.875rem;
  font-size: 0.875rem;
  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.625rem 1.5rem;
  margin-top: 0.5rem;
  background: var(--client-accent, var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
  letter-spacing: 0.02em;
}

.portal-comment-submit:hover {
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.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.8125rem;
  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.125rem;
  transition: var(--theme-transition);
  animation: commentFadeIn 0.2s ease;
}

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

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

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

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

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

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

.video-welcome-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 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: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.video-welcome-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  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;
  opacity: 0.5;
}

.video-welcome-dismiss:hover {
  color: var(--text-primary);
  opacity: 1;
}
[data-theme="dark"] .video-welcome-dismiss:hover {
  color: var(--text-primary);
}

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

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

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

/* -- Board Container ------------------------------------------------- */
.trello-board {
  display: flex;
  gap: 0.75rem;
  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: 4px;
}

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

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

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

.trello-spinner {
  width: 24px;
  height: 24px;
  border: 2px 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.8125rem;
}

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

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

.trello-retry-btn:hover {
  background: #d93a09;
}

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

/* -- List Column ----------------------------------------------------- */
.trello-list {
  flex-shrink: 0;
  width: 270px;
  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(8px);
  animation: trelloListSlideIn 0.3s ease forwards;
}

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

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

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

.trello-list-count {
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 0.1rem 0.375rem;
  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.375rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

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

.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.625rem;
  transition: all var(--transition);
  box-shadow: none;
}

.trello-card:hover {
  border-color: rgba(241, 66, 11, 0.15);
  box-shadow: var(--shadow-card);
}

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

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

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

.trello-label {
  display: inline-block;
  padding: 0.1rem 0.375rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  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.75rem;
  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.375rem;
}

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

.trello-card-due::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  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.375rem;
  font-size: 0.6875rem;
  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.25rem;
  font-size: 0.5625rem;
  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);
}

/* ===================================================================
   Feature: Client Selector Search Bar
   =================================================================== */

.selector-search {
  width: 100%;
  margin-bottom: 1.5rem;
}

.selector-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
  box-shadow: none;
}

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

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

.selector-search-wrap {
  position: relative;
}

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

/* ===================================================================
   Feature: Enhanced Client Cards (Selector)
   =================================================================== */

.selector-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-card);
}

.selector-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.selector-card-abbrev {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.selector-card-website {
  font-size: 0.625rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  transition: opacity var(--transition);
}

.selector-card-website:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.selector-card-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.selector-card-contact-name,
.selector-card-contact-email,
.selector-card-contact-phone {
  font-size: 0.625rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.selector-card-contact-name {
  font-weight: 600;
}

/* ===================================================================
   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: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--theme-transition);
}

.selector-logo {
  height: 24px;
  width: auto;
  opacity: 0.85;
}

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

.selector-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  letter-spacing: 0.02em;
}

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

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

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

.selector-card:hover {
  border-color: rgba(241, 66, 11, 0.15);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

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

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

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

.selector-card-weeks {
  font-size: 0.6875rem;
  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.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  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.3rem 0.625rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.6875rem;
  color: var(--text-muted);
}
[data-theme="dark"] .selector-inactive-item {
  background: rgba(255, 255, 255, 0.02);
}

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

/* ===================================================================
   Feature: Admin Panel
   =================================================================== */

.admin-panel {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 2px solid var(--text-muted);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.admin-panel-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-form {
  display: none;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.admin-form.visible {
  display: block;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.admin-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-form-field.full-width {
  grid-column: 1 / -1;
}

.admin-form-label {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-form-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.625rem;
  font-size: 0.75rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

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

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

.admin-form-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-form-submit {
  padding: 0.4rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-form-submit:hover {
  background: #d93a09;
}

.admin-form-cancel {
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-form-cancel:hover {
  background: var(--bg-card-hover);
}

/* Admin delete button on cards */
.selector-card-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 2;
  line-height: 1;
  opacity: 0;
}

.selector-card:hover .selector-card-delete {
  opacity: 0.5;
}

.selector-card-delete:hover {
  opacity: 1 !important;
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-bg);
}

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

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

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

/* ===================================================================
   RESPONSIVE DESIGN
   =================================================================== */

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

/* Tablet: sidebar collapses */
@media (max-width: 1024px) {
  .sidebar-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 52px;
    height: calc(100vh - 52px);
    width: var(--sidebar-width);
    z-index: 90;
    box-shadow: 2px 0 16px rgba(0,0,0,0.1);
    transition: left 0.25s ease, background-color 0.3s ease;
  }

  .sidebar--open {
    left: 0;
  }

  .main-layout {
    display: flex;
  }

  .content-area {
    width: 100%;
  }

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

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

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

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

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

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

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

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

  .header-logo {
    height: 22px;
  }

  .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.625rem 0.75rem;
    font-size: 0.75rem;
  }

  .tab-icon {
    display: none;
  }

  .card {
    padding: 1.25rem;
  }

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

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

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

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

  .welcome-banner-inner {
    padding: 0.625rem 1rem;
    gap: 0.5rem;
  }

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

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

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

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

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

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

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

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

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

  .theme-toggle {
    width: 28px;
    height: 28px;
    padding: 5px;
    overflow: hidden;
  }

  .theme-label--to-dark,
  .theme-label--to-light {
    display: none !important;
  }

  /* Goals table responsive */
  .goals-table-wrap {
    margin: 0 -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .goals-table {
    font-size: 0.75rem;
  }

  .goals-table thead th {
    padding: 0.5rem 0.5rem;
    font-size: 0.5rem;
  }

  .goals-table tbody td {
    padding: 0.5rem 0.5rem;
  }

  .goals-table-dept {
    min-width: 100px;
  }

  .goals-table-member {
    min-width: 90px;
  }

  .goals-table-goal {
    min-width: 180px;
  }

  /* About grid responsive */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .referral-form-grid {
    grid-template-columns: 1fr;
  }

  /* Metrics responsive */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Screenshots responsive */
  .screenshots-grid {
    grid-template-columns: 1fr;
  }

  /* Video responsive */
  .video-welcome-inner {
    padding: 0.75rem 1rem;
  }

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

  /* Chat panel responsive */
  .chat-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 4.5rem;
  }

  .chat-bubble {
    width: 40px;
    height: 40px;
    bottom: 1rem;
    right: 1rem;
  }

  /* Trello responsive */
  .trello-board {
    flex-direction: column;
    overflow-x: visible;
    gap: 0.625rem;
  }

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

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

  /* Selector responsive */
  .selector-content {
    padding: 2rem 1rem 1.5rem;
  }

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

  .selector-card {
    padding: 1rem;
  }

  .selector-card-icon {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  /* Admin form responsive */
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .selector-card-contact {
    align-items: center;
  }

  .portal-comment-author {
    max-width: 100%;
  }

  /* Achievements responsive */
  .achievements-timeline {
    padding-left: 1.5rem;
  }

  .achievement-marker {
    margin-left: -1.5rem;
    width: 20px;
    height: 20px;
  }

  .achievement-marker svg {
    width: 10px;
    height: 10px;
  }
}

/* Small phones */
@media (max-width: 600px) {
  .selector-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 15px;
  }

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

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

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

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

  .tab {
    padding: 0.5rem 0.5rem;
    font-size: 0.6875rem;
  }

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

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

  .trello-list-header {
    padding: 0.625rem 0.625rem;
  }

  .trello-card {
    padding: 0.5rem;
  }

  .about-hero-title {
    font-size: 1.375rem;
  }
}

/* ===================================================================
   Print Styles (basic)
   =================================================================== */
@media print {
  .sidebar,
  .sidebar-toggle,
  .chat-bubble,
  .chat-panel,
  .theme-toggle,
  .header-back-link,
  .video-welcome,
  .lightbox-overlay {
    display: none !important;
  }

  .main-layout {
    display: block;
  }

  .content-area {
    width: 100%;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* ---- Team Profiles (About PMG) ---- */
.about-team { margin-bottom: 2.5rem; }
.about-team-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.about-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.about-team-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.about-team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.about-team-photo-wrap { margin-bottom: 1rem; }
.about-team-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-card);
  transition: border-color 0.2s ease;
}
.about-team-card:hover .about-team-photo {
  border-color: var(--accent);
}
.about-team-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}
.about-team-role {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.about-team-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,119,181,0.1);
  color: #0077b5;
  transition: background 0.2s ease;
  margin-bottom: 0.75rem;
}
.about-team-linkedin:hover {
  background: #0077b5;
  color: #fff;
}
.about-team-bio {
  font-size: 0.813rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .about-team-grid {
    grid-template-columns: 1fr;
  }
  .about-team-photo {
    width: 80px;
    height: 80px;
  }
}
