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

    :root {
      color-scheme: light;
      --bg-primary: #f8fafc;
      --bg-secondary: #f1f5f9;
      --bg-card: #ffffff;
      --bg-card-alt: #f8fafc;
      --bg-overlay: rgba(15, 23, 42, 0.62);
      --accent-green: #22c55e;
      --accent-green-strong: #166534;
      --accent-green-light: rgba(34, 197, 94, 0.1);
      --accent-lime: #84cc16;
      --accent-lime-light: rgba(132, 204, 22, 0.1);
      --accent-yellow: #eab308;
      --accent-yellow-light: rgba(234, 179, 8, 0.1);
      --accent-red: #ef4444;
      --accent-red-light: rgba(239, 68, 68, 0.1);
      --accent-blue: #2563eb;
      --accent-blue-light: rgba(59, 130, 246, 0.1);
      --accent-purple: #a855f7;
      --accent-purple-light: rgba(168, 85, 247, 0.1);
      --text-primary: #1e293b;
      --text-secondary: #475569;
      --text-muted: #526071;
      --border-subtle: rgba(0,0,0,0.08);
      --border-default: #cbd5e1;
      --focus-ring: #166534;
      --focus-halo: rgba(22, 101, 52, 0.22);
      --button-primary-text: #ffffff;
      --danger-surface: #fee2e2;
      --danger-border: #fecaca;
      --danger-text: #b91c1c;
      --rating-star: #854d0e;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
      --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
      --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
      --radius: 12px;
    }

    [data-theme="dark"] {
      color-scheme: dark;
      --bg-primary: #0f172a;
      --bg-secondary: #1e293b;
      --bg-card: #1e293b;
      --bg-card-alt: #29384d;
      --bg-overlay: rgba(2, 6, 23, 0.78);
      --accent-green: #4ade80;
      --accent-green-strong: #86efac;
      --accent-green-light: rgba(74, 222, 128, 0.14);
      --accent-lime: #bef264;
      --accent-lime-light: rgba(190, 242, 100, 0.14);
      --accent-yellow: #fde047;
      --accent-yellow-light: rgba(253, 224, 71, 0.14);
      --accent-red: #fca5a5;
      --accent-red-light: rgba(252, 165, 165, 0.14);
      --accent-blue: #93c5fd;
      --accent-blue-light: rgba(147, 197, 253, 0.14);
      --accent-purple: #d8b4fe;
      --accent-purple-light: rgba(216, 180, 254, 0.14);
      --text-primary: #f8fafc;
      --text-secondary: #cbd5e1;
      --text-muted: #a8b5c7;
      --border-subtle: rgba(226, 232, 240, 0.18);
      --border-default: #475569;
      --focus-ring: #86efac;
      --focus-halo: rgba(134, 239, 172, 0.24);
      --button-primary-text: #052e16;
      --danger-surface: rgba(185, 28, 28, 0.24);
      --danger-border: rgba(252, 165, 165, 0.55);
      --danger-text: #fecaca;
      --rating-star: #fde047;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.34);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.42);
      --shadow-lg: 0 18px 48px rgba(0,0,0,0.56);
    }

    body {
      font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg-primary);
      color: var(--text-primary);
      min-height: 100vh;
      line-height: 1.5;
    }

    body.widget-modal-open {
      overflow: hidden;
    }

    /* Accessibility - Skip Link */
    .skip-link {
      position: absolute;
      top: -40px;
      left: 0;
      padding: 8px 16px;
      background: var(--accent-green);
      color: white;
      text-decoration: none;
      font-weight: 600;
      z-index: 1001;
      transition: top 0.3s;
    }

    .skip-link:focus {
      top: 0;
    }

    /* Accessibility - Focus Indicators */
    *:focus {
      outline: 2px solid var(--focus-ring);
      outline-offset: 2px;
    }

    *:focus:not(:focus-visible) {
      outline: none;
    }

    *:focus-visible {
      outline: 2px solid var(--focus-ring);
      outline-offset: 2px;
    }

    /* High contrast focus for buttons */
    button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
      outline: 3px solid var(--focus-ring);
      outline-offset: 2px;
      box-shadow: 0 0 0 6px var(--focus-halo);
    }

    /* Reduce motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

    .loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--bg-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      z-index: 1000;
    }

    .loading-overlay.hidden { display: none; }

    .spinner {
      width: 40px;
      height: 40px;
      border: 3px solid var(--bg-secondary);
      border-top-color: var(--accent-green);
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

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

    /* Skeleton Loading States */
    .skeleton {
      background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-alt) 50%, var(--bg-secondary) 75%);
      background-size: 200% 100%;
      animation: skeleton-shimmer 1.5s ease-in-out infinite;
      border-radius: 8px;
    }

    @keyframes skeleton-shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    .skeleton-card {
      background: var(--bg-card);
      border-radius: 16px;
      padding: 24px;
      margin-bottom: 24px;
      border: 1px solid var(--border-subtle);
    }

    .skeleton-title {
      height: 24px;
      width: 60%;
      margin-bottom: 20px;
    }

    .skeleton-bar {
      height: 32px;
      width: 100%;
      margin-bottom: 16px;
    }

    .skeleton-text {
      height: 16px;
      margin-bottom: 12px;
    }

    .skeleton-text.short { width: 40%; }
    .skeleton-text.medium { width: 70%; }
    .skeleton-text.full { width: 100%; }

    .skeleton-avatar {
      width: 80px;
      height: 80px;
      border-radius: 50%;
    }

    .skeleton-stat {
      height: 60px;
      border-radius: 12px;
    }

    .skeleton-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 20px;
    }

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

    .loading-text {
      margin-top: 16px;
      color: var(--text-muted);
      font-size: 0.95rem;
    }

    /* Skeleton Loading States */
    .skeleton {
      background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
      background-size: 200% 100%;
      animation: skeleton-shimmer 1.5s ease-in-out infinite;
      border-radius: 4px;
    }

    @keyframes skeleton-shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    .skeleton-text {
      height: 1em;
      margin: 8px 0;
    }

    .skeleton-text.short { width: 40%; }
    .skeleton-text.medium { width: 60%; }
    .skeleton-text.long { width: 80%; }

    .skeleton-title {
      height: 1.5em;
      width: 50%;
      margin-bottom: 16px;
    }

    .skeleton-stat {
      height: 48px;
      width: 100%;
      border-radius: 8px;
    }

    .skeleton-card {
      background: var(--bg-card);
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 16px;
    }

    .skeleton-avatar {
      width: 64px;
      height: 64px;
      border-radius: 50%;
    }

    .skeleton-bar {
      height: 8px;
      border-radius: 4px;
      margin: 8px 0;
    }

    .skeleton-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 16px;
    }

    /* Header */
    .header {
      background: var(--bg-card);
      border-bottom: 1px solid var(--border-subtle);
      padding: 16px 24px;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: var(--shadow-sm);
    }

    .header-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .back-link {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      color: var(--text-secondary);
      text-decoration: none;
      font-weight: 500;
      font-size: 0.95rem;
      transition: color 0.2s;
    }

    .back-link:hover { color: var(--accent-green); }

    .header-right {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .manager-tab {
      display: none;
      padding: 8px 16px;
      background: var(--accent-blue-light);
      color: var(--accent-blue);
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.9rem;
      text-decoration: none;
      transition: all 0.2s;
      min-height: 44px;
      align-items: center;
    }

    .manager-tab:hover {
      background: var(--accent-blue);
      color: white;
    }

    .manager-tab.visible { display: flex; }

    .customize-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s;
      min-height: 44px;
    }

    .customize-btn:hover {
      background: var(--bg-card-alt);
      color: var(--accent-green);
      border-color: var(--accent-green);
    }

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

    .sign-out-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      background: var(--danger-surface);
      color: var(--danger-text);
      border: 1px solid var(--danger-border);
      border-radius: 8px;
      font-family: 'Outfit', sans-serif;
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      min-width: 44px;
      min-height: 44px;
    }

    .sign-out-btn:hover {
      border-color: var(--danger-text);
    }

    .sign-out-btn svg {
      flex-shrink: 0;
    }

    @media (max-width: 600px) {
      .sign-out-text {
        display: none;
      }
      .sign-out-btn {
        padding: 8px;
      }
    }

    /* Widget Settings Modal */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--bg-overlay);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: all 0.3s;
    }

    .modal-overlay.visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .modal {
      background: var(--bg-card);
      border-radius: 16px;
      width: 90%;
      max-width: 480px;
      max-height: 80vh;
      overflow: hidden;
      box-shadow: var(--shadow-lg);
      transform: scale(0.95);
      transition: transform 0.3s;
    }

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

    .modal-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-header h2 {
      font-size: 1.1rem;
      font-weight: 700;
    }

    .modal-close {
      width: 44px;
      height: 44px;
      background: var(--bg-secondary);
      border: none;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      transition: all 0.2s;
    }

    .modal-close:hover {
      background: var(--accent-red-light);
      color: var(--accent-red);
    }

    .modal-body {
      padding: 16px 24px;
      max-height: 50vh;
      overflow-y: auto;
    }

    .modal-footer {
      padding: 16px 24px;
      border-top: 1px solid var(--border-subtle);
      display: flex;
      gap: 12px;
      justify-content: flex-end;
    }

    .modal-btn {
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      border: none;
      min-height: 44px;
    }

    .modal-btn.primary {
      background: var(--accent-green-strong);
      color: var(--button-primary-text);
    }

    .modal-btn.primary:hover {
      opacity: 0.9;
    }

    .modal-btn.secondary {
      background: var(--bg-secondary);
      color: var(--text-secondary);
    }

    .modal-btn.secondary:hover {
      background: var(--bg-card-alt);
    }

    /* Review Detail Modal - Extended Styles */
    #reviewDetailModal .modal {
      max-width: 700px;
    }

    #reviewDetailModal .modal-body {
      max-height: 65vh;
      padding: 0;
    }

    .review-detail-header {
      background: linear-gradient(135deg, var(--accent-green), var(--accent-emerald));
      color: white;
      padding: 24px;
    }

    .review-detail-title {
      font-size: 1.25rem;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .review-detail-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      font-size: 0.9rem;
      opacity: 0.9;
    }

    .review-detail-meta span {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .calendar-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      background: var(--accent-blue-light);
      color: var(--accent-blue);
      border: none;
      border-radius: 6px;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .calendar-btn:hover {
      background: var(--accent-blue);
      color: white;
    }

    .review-sections {
      padding: 24px;
    }

    .review-section-item {
      margin-bottom: 24px;
    }

    .review-section-item:last-child {
      margin-bottom: 0;
    }

    .review-section-title {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .review-section-content {
      background: var(--bg-secondary);
      padding: 16px;
      border-radius: 8px;
      font-size: 0.95rem;
      line-height: 1.6;
      color: var(--text-primary);
      white-space: pre-wrap;
    }

    .acknowledgment-section {
      background: var(--accent-yellow-light);
      border-top: 1px solid rgba(234, 179, 8, 0.3);
      padding: 24px;
    }

    .acknowledgment-notice {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
    }

    .acknowledgment-notice-icon {
      font-size: 1.5rem;
      flex-shrink: 0;
    }

    .acknowledgment-notice-text {
      font-size: 0.9rem;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    .acknowledgment-notice-text strong {
      color: var(--text-primary);
    }

    .acknowledgment-checkbox {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 16px;
    }

    .acknowledgment-checkbox input[type="checkbox"] {
      width: 20px;
      height: 20px;
      margin-top: 2px;
      accent-color: var(--accent-green);
      cursor: pointer;
    }

    .acknowledgment-checkbox label {
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--text-primary);
      cursor: pointer;
    }

    .acknowledgment-notes {
      width: 100%;
      padding: 12px;
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      font-family: inherit;
      font-size: 0.9rem;
      background: var(--bg-card);
      color: var(--text-primary);
      resize: vertical;
      min-height: 80px;
    }

    .acknowledgment-notes::placeholder {
      color: var(--text-muted);
    }

    .acknowledge-btn {
      width: 100%;
      padding: 14px;
      background: var(--accent-green);
      color: white;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      margin-top: 12px;
    }

    .acknowledge-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .acknowledge-btn:not(:disabled):hover {
      opacity: 0.9;
    }

    .already-acknowledged {
      background: var(--accent-green-light);
      padding: 16px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .already-acknowledged-icon {
      font-size: 1.5rem;
    }

    .already-acknowledged-text {
      font-size: 0.9rem;
      color: var(--accent-green);
      font-weight: 500;
    }

    /* Widget List */
    .widget-list {
      list-style: none;
    }

    .widget-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      background: var(--bg-card-alt);
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      margin-bottom: 8px;
      cursor: grab;
      transition: all 0.2s;
    }

    .widget-item:active {
      cursor: grabbing;
    }

    .widget-item.dragging {
      opacity: 0.5;
      background: var(--accent-green-light);
      border-color: var(--accent-green);
    }

    .widget-item.drag-over {
      border-color: var(--accent-green);
      border-style: dashed;
    }

    .widget-drag-handle {
      color: var(--text-muted);
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .widget-drag-handle span {
      display: block;
      width: 16px;
      height: 2px;
      background: currentColor;
      border-radius: 1px;
    }

    .widget-info {
      flex: 1;
    }

    .widget-order-actions {
      display: inline-flex;
      gap: 6px;
    }

    .widget-order-btn {
      width: 44px;
      height: 44px;
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      background: var(--bg-card);
      color: var(--text-secondary);
      cursor: pointer;
      font-weight: 800;
    }

    .widget-order-btn:focus-visible {
      outline: 3px solid var(--focus-ring);
      outline-offset: 2px;
    }

    .widget-name {
      font-weight: 600;
      font-size: 0.9rem;
    }

    .widget-toggle {
      position: relative;
      width: 44px;
      height: 44px;
      background: transparent;
      border-radius: 22px;
      cursor: pointer;
      transition: background 0.3s;
      border: 0;
      padding: 0;
      flex: 0 0 auto;
    }

    .widget-toggle:focus-visible {
      outline: 3px solid var(--focus-ring);
      outline-offset: 3px;
    }

    .widget-toggle.active {
      background: transparent;
    }

    .widget-toggle::before {
      content: '';
      position: absolute;
      top: 10px;
      left: 0;
      width: 44px;
      height: 24px;
      border-radius: 12px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-default);
      transition: background 0.3s, border-color 0.3s;
    }

    .widget-toggle.active::before {
      background: var(--accent-green-strong);
      border-color: var(--accent-green-strong);
    }

    .widget-toggle::after {
      content: '';
      position: absolute;
      top: 12px;
      left: 2px;
      width: 20px;
      height: 20px;
      background: white;
      border-radius: 50%;
      transition: transform 0.3s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .widget-toggle.active::after {
      transform: translateX(20px);
    }

    .widget-settings-hint {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 16px;
    }

    @media (max-width: 360px) {
      .modal {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
      }

      .modal-header,
      .modal-body,
      .modal-footer {
        padding: 12px;
      }

      .modal-footer {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
      }

      .widget-item {
        gap: 6px;
        padding: 8px;
      }

      .widget-drag-handle {
        display: none;
      }

      .widget-order-actions {
        gap: 4px;
      }

      .widget-name {
        font-size: 0.78rem;
        overflow-wrap: anywhere;
      }
    }

    /* Sessions List */
    .session-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      background: var(--bg-card-alt);
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      margin-bottom: 8px;
    }

    .session-item.current {
      border-color: var(--accent-green);
      background: var(--accent-green-light);
    }

    .session-icon {
      width: 40px;
      height: 40px;
      background: var(--bg-secondary);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
    }

    .session-info {
      flex: 1;
    }

    .session-device {
      font-weight: 600;
      font-size: 0.9rem;
    }

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

    .session-current-badge {
      font-size: 0.7rem;
      padding: 2px 8px;
      background: var(--accent-green);
      color: white;
      border-radius: 4px;
      font-weight: 600;
    }

    .session-signout {
      padding: 6px 12px;
      background: var(--accent-red-light);
      color: var(--accent-red);
      border: none;
      border-radius: 6px;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .session-signout:hover {
      background: var(--accent-red);
      color: white;
    }

    .signout-all-btn {
      width: 100%;
      padding: 12px;
      margin-top: 12px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s;
    }

    .signout-all-btn:hover {
      background: var(--accent-red-light);
      color: var(--accent-red);
      border-color: var(--accent-red);
    }

    /* Fun Facts Section Styles */
    .funfacts-section {
      background: linear-gradient(135deg, var(--bg-card) 0%, rgba(168, 85, 247, 0.05) 100%);
      border: 1px solid rgba(168, 85, 247, 0.2);
    }

    .funfacts-section .section-title {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .easter-egg-badge {
      font-size: 0.65rem;
      padding: 3px 8px;
      background: linear-gradient(135deg, #a855f7, #ec4899);
      color: white;
      border-radius: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      animation: sparkle 2s ease-in-out infinite;
    }

    @keyframes sparkle {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.8; transform: scale(1.05); }
    }

    .funfacts-intro {
      color: var(--text-muted);
      font-size: 0.95rem;
      margin-bottom: 20px;
    }

    .funfacts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .funfact-card {
      display: flex;
      gap: 16px;
      padding: 20px;
      background: var(--bg-card);
      border-radius: 12px;
      border: 1px solid var(--border-subtle);
      transition: all 0.2s;
    }

    .funfact-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15);
      border-color: rgba(168, 85, 247, 0.3);
    }

    .funfact-icon {
      font-size: 2.5rem;
      flex-shrink: 0;
    }

    .funfact-content {
      flex: 1;
    }

    .funfact-title {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 4px;
    }

    .funfact-value {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 8px;
      background: linear-gradient(135deg, #a855f7, #ec4899);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .funfact-detail {
      font-size: 0.9rem;
      color: var(--text-secondary);
      line-height: 1.4;
    }

    .achievements-section {
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px dashed var(--border-subtle);
    }

    .achievements-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 16px;
      color: var(--text-primary);
    }

    .achievements-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
    }

    .achievement-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 16px;
      background: linear-gradient(135deg, var(--accent-green-light), var(--accent-blue-light));
      border: 1px solid var(--accent-green);
      border-radius: 24px;
      transition: all 0.2s;
    }

    .achievement-badge:hover {
      transform: scale(1.02);
      box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
    }

    .achievement-icon {
      font-size: 1.3rem;
    }

    .achievement-info {
      display: flex;
      flex-direction: column;
    }

    .achievement-name {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-primary);
    }

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

    .funfacts-footer {
      margin-top: 20px;
      padding: 12px 16px;
      background: var(--bg-secondary);
      border-radius: 8px;
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .funfacts-footer p {
      margin: 0;
    }

    /* AI Insight Styles */
    .ai-insight-container {
      margin-bottom: 20px;
    }

    .ai-insight-loading {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 16px 20px;
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
      border-radius: 12px;
      color: var(--text-muted);
      font-size: 0.9rem;
    }

    .ai-sparkle {
      font-size: 1.2rem;
      animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.6; transform: scale(1.1); }
    }

    .ai-insight {
      padding: 20px;
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.08));
      border: 1px solid rgba(168, 85, 247, 0.2);
      border-radius: 12px;
    }

    .ai-insight-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
    }

    .ai-insight-label {
      font-size: 0.8rem;
      font-weight: 600;
      color: #a855f7;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .ai-insight-text {
      font-size: 1rem;
      line-height: 1.6;
      color: var(--text-primary);
      margin: 0;
    }

    /* Percentile Section Styles */
    .percentile-section {
      margin-bottom: 24px;
      padding: 20px;
      background: var(--bg-secondary);
      border-radius: 12px;
    }

    .percentile-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 16px;
      color: var(--text-primary);
    }

    .percentile-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
    }

    .percentile-card {
      padding: 16px;
      background: var(--bg-card);
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
    }

    .percentile-label {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 6px;
    }

    .percentile-value {
      font-size: 1.4rem;
      font-weight: 700;
      background: linear-gradient(135deg, #22c55e, #3b82f6);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 10px;
    }

    .percentile-bar {
      height: 8px;
      background: var(--bg-secondary);
      border-radius: 4px;
      overflow: hidden;
    }

    .percentile-fill {
      height: 100%;
      background: linear-gradient(90deg, #22c55e, #3b82f6);
      border-radius: 4px;
      transition: width 0.6s ease-out;
    }

    /* Progress Section Styles */
    .progress-section {
      margin-bottom: 24px;
      padding: 20px;
      background: var(--bg-secondary);
      border-radius: 12px;
    }

    .progress-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 16px;
      color: var(--text-primary);
    }

    .milestone-progress {
      margin-bottom: 16px;
    }

    .milestone-progress:last-child {
      margin-bottom: 0;
    }

    .milestone-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      font-size: 0.9rem;
      color: var(--text-secondary);
    }

    .milestone-count {
      font-weight: 600;
      color: var(--text-primary);
    }

    .milestone-bar {
      height: 12px;
      background: var(--bg-card);
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid var(--border-subtle);
    }

    .milestone-fill {
      height: 100%;
      background: linear-gradient(90deg, #a855f7, #ec4899);
      border-radius: 6px;
      transition: width 0.6s ease-out;
    }

    .milestone-remaining {
      margin-top: 6px;
      font-size: 0.8rem;
      color: var(--text-muted);
      text-align: right;
    }

    /* Locked Achievements Styles */
    .locked-section {
      opacity: 0.85;
    }

    .achievement-badge.locked {
      background: var(--bg-secondary);
      border: 1px dashed var(--border-subtle);
      opacity: 0.7;
    }

    .achievement-badge.locked .achievement-icon {
      filter: grayscale(50%);
    }

    .achievement-badge.locked .achievement-name {
      color: var(--text-muted);
    }

    .achievement-progress-bar {
      margin-top: 6px;
      height: 4px;
      background: var(--bg-card);
      border-radius: 2px;
      overflow: hidden;
    }

    .achievement-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #a855f7, #ec4899);
      border-radius: 2px;
    }

    /* Earned Badges Section (from user_badges) */
    .earned-badges-section {
      margin-bottom: 24px;
    }

    .earned-badges-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 1rem;
      margin-bottom: 12px;
      color: var(--text-primary);
    }

    .earned-badges-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
    }

    .earned-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
      border: 1px solid rgba(34, 197, 94, 0.3);
      border-radius: 12px;
      transition: all 0.2s ease;
    }

    .earned-badge:hover {
      transform: translateY(-2px);
      border-color: rgba(34, 197, 94, 0.5);
      box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
    }

    .earned-badge.special {
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
      border-color: rgba(168, 85, 247, 0.3);
    }

    .earned-badge.special:hover {
      border-color: rgba(168, 85, 247, 0.5);
      box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
    }

    .earned-badge-icon {
      font-size: 1.5rem;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-secondary);
      border-radius: 10px;
    }

    .earned-badge-info {
      flex: 1;
    }

    .earned-badge-name {
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--text-primary);
    }

    .earned-badge-desc {
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .earned-badge-date {
      font-size: 0.7rem;
      color: var(--text-muted);
      margin-top: 4px;
      opacity: 0.7;
    }

    .earned-badges-loading {
      text-align: center;
      padding: 20px;
      color: var(--text-muted);
    }

    .earned-badges-empty {
      text-align: center;
      padding: 20px;
      color: var(--text-muted);
      font-style: italic;
    }

    /* Activity Feed Styles */
    .activity-feed {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .activity-item {
      display: flex;
      gap: 12px;
      padding: 12px;
      background: var(--bg-secondary);
      border-radius: 10px;
      transition: background 0.2s;
    }

    .activity-item:hover {
      background: var(--bg-card-alt);
    }

    .activity-icon {
      flex-shrink: 0;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--accent-green-light);
      border-radius: 10px;
      font-size: 18px;
    }

    .activity-item.badge .activity-icon {
      background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(234, 179, 8, 0.2));
    }

    .activity-item.feedback .activity-icon {
      background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    }

    .activity-item.challenge .activity-icon {
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
    }

    .activity-item.easter_egg .activity-icon {
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.2));
    }

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

    .activity-title {
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .activity-desc {
      font-size: 0.85rem;
      color: var(--text-secondary);
      margin-bottom: 4px;
    }

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

    /* Notifications Widget Styles */
    .notifications-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .notification-item {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px;
      background: var(--bg-secondary);
      border-radius: 10px;
      transition: all 0.2s;
      position: relative;
    }

    .notification-item.unread {
      background: rgba(52, 211, 153, 0.08);
      border-left: 3px solid var(--accent-green);
    }

    .notification-item.read {
      opacity: 0.7;
    }

    .notification-item:hover {
      background: var(--bg-card-alt);
    }

    .notification-icon {
      flex-shrink: 0;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--accent-green-light);
      border-radius: 10px;
      font-size: 18px;
    }

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

    .notification-title {
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--text-primary);
      margin-bottom: 2px;
    }

    .notification-message {
      font-size: 0.85rem;
      color: var(--text-secondary);
      margin-bottom: 4px;
      line-height: 1.4;
    }

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

    .notification-link {
      font-size: 0.8rem;
      color: var(--accent-green);
      text-decoration: none;
      padding: 4px 10px;
      border-radius: 6px;
      background: var(--accent-green-light);
    }

    .notification-link:hover {
      background: var(--accent-green);
      color: white;
    }

    .notification-mark-read {
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      padding: 4px 8px;
      font-size: 14px;
      border-radius: 4px;
    }

    .notification-mark-read:hover {
      background: var(--accent-green-light);
      color: var(--accent-green);
    }

    /* Team Challenges Widget Styles */
    .team-challenges-section {
      background: linear-gradient(135deg, var(--bg-card) 0%, rgba(250, 204, 21, 0.05) 100%);
      border: 1px solid rgba(250, 204, 21, 0.2);
    }

    .team-challenges-grid {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .team-challenge-card {
      background: var(--bg-secondary);
      border-radius: 12px;
      padding: 16px;
      border: 1px solid var(--border-subtle);
    }

    .challenge-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }

    .challenge-title {
      font-weight: 600;
      color: var(--text-primary);
      margin: 0;
    }

    .days-left {
      font-size: 0.75rem;
      color: var(--accent-amber);
      background: var(--accent-amber-light);
      padding: 3px 8px;
      border-radius: 12px;
      font-weight: 500;
    }

    .challenge-desc {
      font-size: 0.9rem;
      color: var(--text-secondary);
      margin-bottom: 12px;
    }

    .challenge-progress {
      margin-bottom: 12px;
    }

    .challenge-progress .progress-bar {
      height: 10px;
      background: var(--bg-card);
      border-radius: 5px;
      overflow: hidden;
      margin-bottom: 6px;
    }

    .challenge-progress .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #facc15, #eab308);
      border-radius: 5px;
      transition: width 0.5s ease;
    }

    .progress-stats {
      display: flex;
      justify-content: space-between;
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .challenge-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.85rem;
      color: var(--text-secondary);
    }

    .join-btn {
      background: linear-gradient(135deg, #facc15, #eab308);
      color: #1f2937;
      border: none;
      padding: 8px 16px;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.2s;
    }

    .join-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
    }

    .empty-challenges {
      text-align: center;
      padding: 24px;
      color: var(--text-muted);
    }

    .empty-challenges .empty-icon {
      font-size: 40px;
      display: block;
      margin-bottom: 12px;
    }

    /* Growth Challenges Widget Styles */
    .challenges-section {
      background: linear-gradient(135deg, var(--bg-card) 0%, rgba(34, 197, 94, 0.05) 100%);
      border: 1px solid rgba(34, 197, 94, 0.2);
    }

    .challenges-section .section-title {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .challenges-header-badge {
      font-size: 0.7rem;
      padding: 3px 10px;
      background: linear-gradient(135deg, #22c55e, #10b981);
      color: white;
      border-radius: 12px;
      font-weight: 600;
    }

    .challenges-intro {
      color: var(--text-muted);
      font-size: 0.95rem;
      margin: 0;
    }

    .challenges-header-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .btn-browse-library {
      padding: 10px 18px;
      background: linear-gradient(135deg, #6366f1, #8b5cf6);
      color: white;
      border: none;
      border-radius: 10px;
      font-weight: 600;
      font-size: 0.9rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
    }

    .btn-browse-library:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    }

    .challenges-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .challenge-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 20px;
      transition: all 0.2s;
    }

    .challenge-card:hover {
      box-shadow: 0 4px 16px rgba(34, 197, 94, 0.1);
      border-color: var(--accent-green);
    }

    .challenge-card.in-progress {
      border-left: 4px solid var(--accent-blue);
    }

    .challenge-card.completed {
      border-left: 4px solid var(--accent-green);
      opacity: 0.8;
    }

    .challenge-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .challenge-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .challenge-status-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 0.75rem;
      font-weight: 600;
    }

    .challenge-status-badge.new {
      background: rgba(59, 130, 246, 0.1);
      color: var(--accent-blue);
    }

    .challenge-status-badge.in-progress {
      background: rgba(234, 179, 8, 0.1);
      color: #ca8a04;
    }

    .challenge-status-badge.completed {
      background: rgba(34, 197, 94, 0.1);
      color: var(--accent-green);
    }

    .challenge-priority {
      font-size: 0.7rem;
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 600;
      text-transform: uppercase;
    }

    .challenge-priority.high {
      background: rgba(239, 68, 68, 0.1);
      color: var(--accent-red);
    }

    .challenge-priority.normal {
      background: var(--bg-secondary);
      color: var(--text-muted);
    }

    .challenge-text {
      font-size: 1rem;
      line-height: 1.6;
      color: var(--text-primary);
      margin-bottom: 12px;
    }

    .challenge-from {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin-bottom: 12px;
    }

    .challenge-due {
      font-size: 0.85rem;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .challenge-due.soon {
      color: #ca8a04;
    }

    .challenge-due.overdue {
      color: var(--accent-red);
    }

    .challenge-actions {
      display: flex;
      gap: 10px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border-subtle);
    }

    .btn-challenge-action {
      flex: 1;
      padding: 10px 16px;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.9rem;
      cursor: pointer;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .btn-challenge-accept {
      background: linear-gradient(135deg, var(--accent-green), var(--accent-lime));
      color: white;
      border: none;
    }

    .btn-challenge-accept:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    }

    .btn-challenge-complete {
      background: linear-gradient(135deg, #6366f1, #8b5cf6);
      color: white;
      border: none;
    }

    .btn-challenge-complete:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }

    .btn-challenge-progress {
      background: var(--bg-secondary);
      color: var(--text-secondary);
      border: 1px solid var(--border-subtle);
    }

    .btn-challenge-progress:hover {
      background: var(--bg-card-alt);
    }

    .challenges-empty {
      text-align: center;
      padding: 40px 20px;
      color: var(--text-muted);
    }

    .challenges-empty-icon {
      font-size: 3rem;
      margin-bottom: 12px;
    }

    .challenges-empty h3 {
      color: var(--text-primary);
      margin-bottom: 8px;
    }

    /* Challenge completion modal */
    .challenge-complete-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      opacity: 0;
      visibility: hidden;
      transition: all 0.2s;
    }

    .challenge-complete-modal.visible {
      opacity: 1;
      visibility: visible;
    }

    .challenge-complete-content {
      background: white;
      border-radius: 16px;
      width: 90%;
      max-width: 450px;
      padding: 24px;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .challenge-complete-icon {
      font-size: 4rem;
      margin-bottom: 16px;
    }

    .challenge-complete-title {
      font-size: 1.3rem;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 8px;
    }

    .challenge-complete-subtitle {
      color: var(--text-muted);
      margin-bottom: 20px;
    }

    .challenge-reflection-input {
      width: 100%;
      min-height: 80px;
      padding: 12px;
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      font-family: inherit;
      font-size: 0.95rem;
      resize: vertical;
      margin-bottom: 20px;
    }

    .challenge-complete-actions {
      display: flex;
      gap: 12px;
    }

    .btn-complete-cancel {
      flex: 1;
      padding: 12px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
    }

    .btn-complete-confirm {
      flex: 1;
      padding: 12px;
      background: linear-gradient(135deg, var(--accent-green), var(--accent-lime));
      border: none;
      border-radius: 8px;
      font-weight: 600;
      color: white;
      cursor: pointer;
    }

    /* Challenge Library Modal */
    .challenge-library-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      opacity: 0;
      visibility: hidden;
      transition: all 0.2s;
      padding: 20px;
    }

    .challenge-library-modal.visible {
      opacity: 1;
      visibility: visible;
    }

    .challenge-library-content {
      background: white;
      border-radius: 16px;
      width: 100%;
      max-width: 700px;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .challenge-library-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .challenge-library-title {
      font-size: 1.3rem;
      font-weight: 700;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .challenge-library-close {
      width: 36px;
      height: 36px;
      border: none;
      background: var(--bg-secondary);
      border-radius: 8px;
      cursor: pointer;
      font-size: 1.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .challenge-library-filters {
      padding: 16px 24px;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .library-filter-btn {
      padding: 8px 16px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 20px;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.2s;
    }

    .library-filter-btn.active {
      background: linear-gradient(135deg, #6366f1, #8b5cf6);
      color: white;
      border-color: transparent;
    }

    .challenge-library-body {
      flex: 1;
      overflow-y: auto;
      padding: 20px 24px;
    }

    .library-templates {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .library-template-card {
      background: var(--bg-card-alt);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 20px;
      transition: all 0.2s;
    }

    .library-template-card:hover {
      border-color: var(--accent-purple);
      box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
    }

    .library-template-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 10px;
    }

    .library-template-title {
      font-weight: 700;
      font-size: 1.05rem;
      color: var(--text-primary);
    }

    .library-template-badges {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .library-badge {
      font-size: 0.7rem;
      padding: 3px 8px;
      border-radius: 6px;
      font-weight: 600;
      text-transform: uppercase;
    }

    .library-badge.featured {
      background: linear-gradient(135deg, #f59e0b, #f97316);
      color: white;
    }

    .library-badge.difficulty-beginner {
      background: rgba(34, 197, 94, 0.1);
      color: var(--accent-green);
    }

    .library-badge.difficulty-medium {
      background: rgba(234, 179, 8, 0.1);
      color: #ca8a04;
    }

    .library-badge.difficulty-advanced {
      background: rgba(239, 68, 68, 0.1);
      color: var(--accent-red);
    }

    .library-template-desc {
      color: var(--text-secondary);
      font-size: 0.95rem;
      line-height: 1.5;
      margin-bottom: 12px;
    }

    .library-template-meta {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 16px;
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .library-template-meta span {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .btn-start-challenge {
      padding: 10px 20px;
      background: linear-gradient(135deg, var(--accent-green), var(--accent-lime));
      color: white;
      border: none;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .btn-start-challenge:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    }

    .btn-start-challenge:disabled {
      background: var(--bg-secondary);
      color: var(--text-muted);
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    .library-empty {
      text-align: center;
      padding: 40px 20px;
      color: var(--text-muted);
    }

    .user-menu-wrapper {
      position: relative;
    }

    .user-dropdown {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      background: var(--bg-secondary);
      border: none;
      border-radius: 10px;
      cursor: pointer;
      transition: background 0.2s;
      font-family: inherit;
      font-size: inherit;
      color: inherit;
      min-height: 44px;
    }

    .user-dropdown:hover { background: var(--bg-card-alt); }

    .dropdown-chevron {
      transition: transform 0.2s;
    }

    .user-menu-wrapper.open .dropdown-chevron {
      transform: rotate(180deg);
    }

    .user-dropdown-menu {
      position: absolute;
      top: 100%;
      right: 0;
      margin-top: 8px;
      min-width: 220px;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
      z-index: 1000;
      overflow: hidden;
      display: none;
    }

    .user-menu-wrapper.open .user-dropdown-menu {
      display: block;
    }

    .dropdown-menu-header {
      padding: 16px;
      background: var(--bg-secondary);
    }

    .dropdown-menu-name {
      display: block;
      font-weight: 600;
      color: var(--text-primary);
    }

    .dropdown-menu-role {
      display: block;
      font-size: 0.8rem;
      color: var(--text-muted);
      text-transform: capitalize;
    }

    .dropdown-menu-divider {
      height: 1px;
      background: var(--border-subtle);
    }

    .dropdown-menu-item {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 12px 16px;
      background: none;
      border: none;
      text-decoration: none;
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 0.9rem;
      cursor: pointer;
      transition: background 0.2s;
    }

    .dropdown-menu-item:hover {
      background: var(--bg-secondary);
    }

    .dropdown-menu-item-danger {
      color: #dc2626;
    }

    .dropdown-menu-item-danger:hover {
      background: #fef2f2;
    }

    /* Trend Charts */
    .trend-chart-container {
      margin-top: 16px;
    }

    .trend-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 16px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }

    .trend-copy {
      margin: 4px 0 0;
      max-width: 54ch;
    }

    .trend-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    /* A3: window toggle (Last 7 days / Month / Season-to-date) — compact segmented control. */
    .trend-window-toggle {
      display: inline-flex;
      gap: 4px;
      margin: 10px 0 4px;
      padding: 4px;
      background: #f1f5f9;
      border-radius: 8px;
    }

    .trend-window-btn {
      padding: 6px 14px;
      background: transparent;
      border: none;
      border-radius: 6px;
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.16s ease;
    }

    .trend-window-btn:hover {
      color: #166534;
    }

    .trend-window-btn:focus-visible,
    .trend-tab:focus-visible,
    .trend-hotspot:focus-visible,
    .trend-retry-btn:focus-visible,
    .trend-data-details summary:focus-visible {
      outline: 3px solid #166534;
      outline-offset: 2px;
    }

    .trend-window-btn.active {
      background: #ffffff;
      color: #166534;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    }

    .trend-tab {
      padding: 8px 14px;
      background: #f8fafc;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 6px;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.18s ease;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .trend-tab:hover {
      border-color: rgba(22, 163, 74, 0.25);
      background: #f0fdf4;
      color: #166534;
    }

    .trend-tab.active {
      background: #ecfdf3;
      border-color: rgba(22, 163, 74, 0.25);
      color: #166534;
      box-shadow: 0 8px 16px rgba(22, 163, 74, 0.12);
      position: relative;
      padding-left: 22px;
    }

    .trend-tab.active::before {
      content: '';
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #16a34a;
    }

    .trend-chart {
      position: relative;
      background: #ffffff;
      border-radius: 8px;
      padding: 28px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
      min-height: 220px;
    }

    .trend-chart-shell {
      position: relative;
    }

    .trend-svg-area {
      position: relative;
      width: 100%;
      max-width: 860px;
      margin: 12px auto 0;
    }

    .trend-svg {
      width: 100%;
      height: auto;
      display: block;
    }

    .trend-chart-insights {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin: 8px 0 4px;
    }

    .trend-chart-insights > div {
      min-width: 0;
      padding: 9px 11px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: #f8fafc;
    }

    .trend-chart-insights strong,
    .trend-chart-insights span {
      display: block;
    }

    .trend-chart-insights strong {
      color: #0f172a;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.96rem;
    }

    .trend-chart-insights span {
      margin-top: 2px;
      color: #64748b;
      font-size: 0.7rem;
      line-height: 1.3;
    }

    .trend-chart-meta {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 10px;
    }

    .trend-chart-label {
      font-size: 0.82rem;
      font-weight: 600;
      color: #526071;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .trend-chart-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 2rem;
      font-weight: 700;
      color: #166534;
      line-height: 1.1;
      letter-spacing: 0;
    }

    .trend-chart-delta {
      display: inline-flex;
      align-items: center;
      padding: 6px 13px;
      border-radius: 6px;
      font-size: 0.72rem;
      font-weight: 600;
      white-space: nowrap;
      margin-top: 0;
      position: relative;
      top: -8px;
    }

    .trend-chart-delta.neutral {
      background: #f1f5f9;
      color: #475569;
      border: 1px solid #cbd5e1;
    }

    .route-badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      margin-right: 8px;
      border-radius: 999px;
      background: rgba(22, 163, 74, 0.12);
      color: #166534;
      font-size: 0.82rem;
      font-weight: 700;
    }

    .route-name {
      margin-right: 8px;
      color: var(--text-secondary);
      font-weight: 500;
    }

    .profile-locked {
      max-width: 680px;
      margin: 48px auto;
      padding: 56px 32px;
      text-align: center;
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 28px;
      box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    }

    .profile-locked .lock-icon {
      font-size: 3rem;
      margin-bottom: 16px;
    }

    .profile-locked h2 {
      margin-bottom: 10px;
      color: var(--text-primary);
    }

    .profile-locked p {
      color: var(--text-muted);
      font-size: 1rem;
      max-width: 460px;
      margin: 0 auto;
    }

    .trend-line {
      fill: none;
      stroke: #16a34a;
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 2000;
      stroke-dashoffset: 2000;
      animation: trendDrawLine 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    @keyframes trendDrawLine {
      to { stroke-dashoffset: 0; }
    }

    .trend-bar {
      fill: #16a34a;
      opacity: 0.7;
      transition: opacity 0.15s ease;
    }
    .trend-bar:hover {
      opacity: 1;
    }

    .trend-dot {
      fill: #ffffff;
      stroke: #16a34a;
      stroke-width: 2;
      opacity: 0;
      transition: opacity 0.15s ease;
    }

    .trend-dot.visible {
      opacity: 1;
    }

    .trend-avg-line {
      stroke: #94a3b8;
      stroke-width: 1.2;
      stroke-dasharray: 5 4;
    }

    .trend-avg-label {
      font-size: 9px;
      fill: #64748b;
      font-weight: 600;
    }

    .trend-axis-label {
      font-size: 8.5px;
      fill: #64748b;
    }

    .trend-axis-label.y-label {
      font-weight: 500;
    }

    .trend-axis-label.x-label {
      font-size: 8px;
    }

    .trend-grid-line {
      stroke: rgba(100, 116, 139, 0.14);
      stroke-width: 1;
      stroke-dasharray: 3 4;
    }

    .trend-label {
      font-size: 0.64rem;
      fill: var(--text-muted);
    }

    .trend-hotspot {
      position: absolute;
      transform: translate(-50%, -50%);
      width: 44px;
      height: 44px;
      border-radius: 50%;
      border: none;
      background: transparent;
      cursor: pointer;
      z-index: 3;
    }

    .trend-hotspot:focus-visible {
      background: rgba(22, 101, 52, 0.1);
    }

    .trend-switching {
      opacity: 0.4;
      pointer-events: none;
    }

    .trend-fade-in {
      animation: trendFadeIn 0.3s ease forwards;
    }

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

    .trend-tooltip {
      position: absolute;
      transform: translate(-50%, calc(-100% - 14px));
      background: rgba(15, 23, 42, 0.96);
      color: #f8fafc;
      padding: 10px 12px;
      border-radius: 8px;
      min-width: 148px;
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.16s ease, visibility 0.16s ease;
      pointer-events: none;
      z-index: 4;
    }

    .trend-tooltip.visible {
      opacity: 1;
      visibility: visible;
    }

    .trend-tooltip-date {
      font-size: 0.74rem;
      color: #cbd5e1;
      margin-bottom: 4px;
    }

    .trend-tooltip-value {
      font-size: 1rem;
      font-weight: 700;
      color: #ffffff;
    }

    .trend-tooltip-delta {
      font-size: 0.72rem;
      color: #cbd5e1;
      margin-top: 2px;
    }

    .trend-chart-footer {
      margin-top: 6px;
      font-size: 0.8rem;
      color: #526071;
      text-align: center;
      display: flex;
      justify-content: center;
      gap: 6px 16px;
      flex-wrap: wrap;
    }

    .trend-data-details {
      margin-top: 16px;
      border-top: 1px solid #e2e8f0;
      padding-top: 12px;
    }

    .trend-data-details summary {
      width: fit-content;
      min-height: 44px;
      display: flex;
      align-items: center;
      color: #166534;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 700;
    }

    .trend-data-table-wrap {
      max-height: 320px;
      overflow: auto;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
    }

    .trend-data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.82rem;
    }

    .trend-data-table caption {
      padding: 10px 12px;
      text-align: left;
      color: #475569;
      font-weight: 600;
    }

    .trend-data-table th,
    .trend-data-table td {
      padding: 9px 12px;
      border-top: 1px solid #e2e8f0;
      text-align: left;
      letter-spacing: 0;
    }

    .trend-data-table thead th {
      position: sticky;
      top: 0;
      background: #f8fafc;
      color: #334155;
      z-index: 1;
    }

    .trend-data-table tbody th {
      color: #475569;
      font-weight: 500;
    }

    .trend-data-table td {
      color: #0f172a;
      font-family: 'JetBrains Mono', monospace;
      font-weight: 700;
    }

    .trend-state {
      min-height: 190px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 8px;
      padding: 28px 20px;
      text-align: center;
    }

    .trend-state-title {
      color: #0f172a;
      font-size: 1rem;
      font-weight: 700;
    }

    .trend-state-message {
      max-width: 54ch;
      color: #64748b;
      font-size: 0.85rem;
    }

    .trend-state--error .trend-state-title {
      color: #991b1b;
    }

    .trend-retry-btn {
      min-height: 44px;
      margin-top: 6px;
      padding: 8px 14px;
      border: 1px solid #166534;
      border-radius: 6px;
      background: #ffffff;
      color: #166534;
      cursor: pointer;
      font: inherit;
      font-size: 0.82rem;
      font-weight: 700;
    }

    .trend-subsection-title {
      font-size: 0.9rem;
      font-weight: 700;
      margin: 20px 0 12px;
      color: var(--text-secondary);
    }

    .trend-indicators {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
      margin-top: 18px;
    }

    .trend-period-panel,
    .trend-indicator {
      border-radius: 8px;
      padding: 16px;
      border: 1px solid rgba(15, 23, 42, 0.06);
      text-align: left;
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .trend-indicator.good {
      background: #f0fdf4;
    }

    .trend-indicator.warning {
      background: #fff7ed;
    }

    .trend-indicator.neutral {
      background: #f8fafc;
    }

    .trend-period-panel {
      background: #ffffff;
    }

    .trend-period-panel.season {
      background: #f8fafc;
    }

    .trend-period-heading {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 12px;
    }

    .trend-period-eyebrow {
      font-size: 0.76rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-primary);
    }

    .trend-period-range {
      margin-top: 3px;
      font-size: 0.82rem;
      color: var(--text-muted);
    }

    .trend-period-metrics {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 10px;
    }

    .trend-period-metrics > div {
      min-width: 0;
      padding: 12px;
      border-radius: 14px;
      background: #f8fafc;
      border: 1px solid rgba(15, 23, 42, 0.05);
    }

    .trend-period-metrics strong {
      display: block;
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.35rem;
      line-height: 1.1;
      color: var(--text-primary);
    }

    .trend-period-metrics span {
      display: block;
      margin-top: 4px;
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--text-secondary);
    }

    .trend-period-metrics small {
      display: block;
      margin-top: 3px;
      font-size: 0.72rem;
      color: var(--text-muted);
      line-height: 1.3;
    }

    .trend-summary-card em {
      display: inline-flex;
      margin-top: 8px;
      padding: 3px 7px;
      border-radius: 999px;
      background: #e2e8f0;
      color: #475569;
      font-size: 0.65rem;
      font-style: normal;
      font-weight: 750;
    }

    .trend-summary-card.is-unavailable,
    .trend-summary-card.is-partial {
      border-color: #f59e0b;
      background: #fffbeb;
    }

    .trend-summary-card.is-no_activity {
      background: #f8fafc;
    }

    .indicator-label {
      font-size: 0.78rem;
      color: var(--text-muted);
      margin-bottom: 4px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      font-weight: 600;
    }

    .indicator-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.55rem;
      font-weight: 700;
      line-height: 1.1;
      color: var(--text-primary);
    }

    .indicator-subtitle {
      font-size: 0.8rem;
      color: var(--text-secondary);
      margin-top: 4px;
    }

    .indicator-change {
      font-size: 0.78rem;
      font-weight: 600;
      margin-top: 10px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .indicator-change.up {
      color: #166534;
    }

    .indicator-change.down {
      color: #b91c1c;
    }

    .indicator-change.stable {
      color: var(--text-muted);
    }

    /* Season Comparison */
    .season-comparison {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      margin-top: 16px;
    }

    .season-card {
      border-radius: 18px;
      padding: 18px;
      border: 1px solid rgba(15, 23, 42, 0.06);
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .season-card.improved {
      background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    }

    .season-card.declined {
      background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    }

    .season-label {
      font-size: 0.78rem;
      color: var(--text-muted);
      text-transform: uppercase;
      margin-bottom: 8px;
      letter-spacing: 0.04em;
      font-weight: 600;
    }

    .season-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.7rem;
      font-weight: 700;
      line-height: 1.1;
    }

    .season-subtitle {
      font-size: 0.82rem;
      color: var(--text-secondary);
      margin-top: 4px;
    }

    .season-change {
      font-size: 0.82rem;
      font-weight: 600;
      margin-top: 10px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .season-change.improved {
      color: #166534;
    }

    .season-change.declined {
      color: #b91c1c;
    }

    @media (max-width: 768px) {
      .trend-indicators {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .season-comparison {
        grid-template-columns: 1fr;
      }
    }

    .user-avatar {
      width: 36px;
      height: 36px;
      background: linear-gradient(135deg, var(--accent-green), var(--accent-lime));
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 0.85rem;
      color: white;
    }

    .user-name {
      font-weight: 600;
      font-size: 0.9rem;
    }

    /* Main Container */
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 24px;
    }

    /* Employee Selector (for managers/leadership) */
    .employee-selector-wrapper {
      display: none;
      margin-bottom: 20px;
      padding: 16px 20px;
      background: linear-gradient(135deg, var(--accent-green-light), var(--accent-blue-light));
      border-radius: var(--radius);
      border: 1px solid var(--border-subtle);
    }

    .employee-selector-wrapper.visible {
      display: block;
    }

    .employee-selector-label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 10px;
    }

    .employee-selector-label svg {
      width: 16px;
      height: 16px;
    }

    .employee-selector {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .employee-select {
      flex: 1;
      max-width: 350px;
      padding: 10px 14px;
      font-size: 0.95rem;
      font-family: inherit;
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      background: var(--bg-card);
      color: var(--text-primary);
      cursor: pointer;
      transition: all 0.2s;
    }

    .employee-select:hover {
      border-color: var(--accent-green);
    }

    .employee-select:focus {
      outline: none;
      border-color: var(--accent-green);
      box-shadow: 0 0 0 3px var(--accent-green-light);
    }

    .employee-select optgroup {
      font-weight: 600;
      color: var(--text-primary);
    }

    .employee-select option {
      padding: 8px;
    }

    .viewing-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      background: var(--accent-blue);
      color: white;
      border-radius: 20px;
      font-size: 0.8rem;
      font-weight: 600;
    }

    .viewing-badge.own-profile {
      background: var(--accent-green);
    }

    .back-to-own-btn {
      display: none;
      padding: 8px 16px;
      background: var(--bg-card);
      color: var(--accent-green);
      border: 1px solid var(--accent-green);
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .back-to-own-btn:hover {
      background: var(--accent-green);
      color: white;
    }

    .back-to-own-btn.visible {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    /* Welcome Section */
    .welcome-section {
      background: var(--bg-card);
      border-radius: var(--radius);
      padding: 28px;
      margin-bottom: 24px;
      box-shadow: var(--shadow-md);
      border: 1px solid var(--border-subtle);
    }

    .welcome-header {
      display: flex;
      align-items: center;
      gap: 20px;
      margin-bottom: 24px;
    }

    .welcome-logo {
      width: 60px;
      height: auto;
      border-radius: 8px;
    }

    .welcome-text h1 {
      font-size: 1.75rem;
      font-weight: 700;
      margin-bottom: 4px;
      letter-spacing: -0.02em;
    }

    .welcome-text p {
      color: var(--text-muted);
      font-size: 1rem;
    }

    /* Stats Grid */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
    }

    .stat-card {
      background: var(--bg-card-alt);
      border-radius: 10px;
      padding: 18px;
      text-align: center;
      border: 1px solid var(--border-subtle);
      transition: transform 0.2s, box-shadow 0.2s;
    }

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

    .stat-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.3rem;
      font-weight: 600;
      color: var(--text-primary);
      line-height: 1;
      margin-bottom: 6px;
    }

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

    .stat-sub {
      font-size: 0.65rem;
      color: var(--text-muted);
      margin-top: 2px;
      opacity: 0.7;
    }

    /* Section Cards */
    .section-card {
      background: var(--bg-card);
      border-radius: var(--radius);
      padding: 16px;
      margin-bottom: 16px;
      box-shadow: var(--shadow-sm);
      border: 1px solid var(--border-subtle);
      border-top: 3px solid #16a34a;
    }

    .section-title {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .section-title .icon { font-size: 1.1em; }
    .section-title .icon svg,
    .empty-state-icon svg {
      display: block;
      width: 1.2em;
      height: 1.2em;
    }

    /* Section Header with Actions */
    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 14px;
    }

    .section-header .section-title {
      margin-bottom: 0;
    }

    .section-actions {
      display: flex;
      gap: 8px;
    }

    .export-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s;
    }

    .export-btn:hover {
      background: var(--accent-blue-light);
      border-color: var(--accent-blue);
      color: var(--accent-blue);
    }

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

    /* Benchmark Bars */
    .performance-intro {
      margin-bottom: 12px;
      padding: 12px 14px;
      border-radius: 14px;
      background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
      border: 1px solid rgba(22, 163, 74, 0.12);
    }

    .performance-intro-eyebrow {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #15803d;
    }

    .performance-intro-copy {
      margin: 6px 0 0;
      color: var(--text-secondary);
      font-size: 0.9rem;
      line-height: 1.5;
    }


    .performance-intro-meta {
      margin-top: 8px;
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.45;
    }

    .benchmark-item {
      margin-bottom: 12px;
      padding: 12px 14px;
      border-radius: 16px;
      background: linear-gradient(180deg, #fbfefc 0%, #ffffff 100%);
      border: 1px solid rgba(15, 23, 42, 0.06);
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .benchmark-item:last-child { margin-bottom: 0; }

    .benchmark-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 8px;
    }

    .benchmark-title-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .benchmark-label {
      font-weight: 700;
      font-size: 0.98rem;
      display: inline-flex;
      align-items: center;
      flex-wrap: wrap;
    }

    .benchmark-help-icon {
      margin-left: 8px;
    }

    .benchmark-value-group {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .benchmark-value-stack {
      text-align: right;
    }

    .benchmark-value {
      display: block;
      font-family: 'JetBrains Mono', monospace;
      font-weight: 700;
      font-size: 1.15rem;
      color: var(--text-primary);
      line-height: 1.1;
    }

    .benchmark-delta {
      display: inline-block;
      margin-top: 4px;
      font-size: 0.78rem;
      font-weight: 600;
    }

    .benchmark-delta.good {
      color: #15803d;
    }

    .benchmark-delta.warning {
      color: #c2410c;
    }

    .percentile-badge {
      font-size: 0.72rem;
      font-weight: 700;
      padding: 7px 12px;
      border-radius: 999px;
      background: #f8fafc;
      color: var(--text-secondary);
      border: 1px solid rgba(15, 23, 42, 0.06);
    }

    .percentile-badge.top-10 {
      background: linear-gradient(135deg, #fde68a, #f59e0b);
      color: #1f2937;
      border-color: rgba(245, 158, 11, 0.2);
      box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    }

    .percentile-badge.top-25 {
      background: linear-gradient(135deg, #dcfce7, #bbf7d0);
      color: #166534;
      border-color: rgba(22, 163, 74, 0.2);
    }

    .percentile-badge.top-50 {
      background: linear-gradient(135deg, #dbeafe, #bfdbfe);
      color: #1d4ed8;
      border-color: rgba(59, 130, 246, 0.2);
    }

    .benchmark-bar-shell {
      padding-top: 26px; /* headroom so the "Avg" marker above the bar is never clipped */
    }

    .benchmark-bar-container {
      position: relative;
      height: 10px;
      background: var(--bg-secondary);
      border-radius: 6px;
      /* NOT overflow:hidden — the Avg marker sits above the bar and must stay visible.
         The fill has its own border-radius, so corners still look rounded. */
    }

    .benchmark-bar {
      height: 100%;
      max-width: 100%;
      border-radius: 6px;
      transition: width 0.4s ease;
      background: linear-gradient(90deg, var(--accent-green), var(--accent-lime));
    }

    .benchmark-bar.warning {
      background: linear-gradient(90deg, #f59e0b, #fbbf24);
    }

    .benchmark-avg-marker {
      position: absolute;
      top: -20px;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      z-index: 2;
    }

    .benchmark-avg-marker-pin {
      width: 12px;
      height: 2px;
      background: #0f172a;
      border-radius: 999px;
    }

    .benchmark-avg-label {
      font-size: 0.68rem;
      font-weight: 700;
      color: #0f172a;
      background: rgba(255, 255, 255, 0.96);
      padding: 2px 7px;
      border-radius: 999px;
      border: 1px solid rgba(15, 23, 42, 0.08);
    }

    .benchmark-meta {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      margin-top: 8px;
      font-size: 0.72rem;
      color: var(--text-muted);
    }
    /* Three "Company Min / Company Average / Company Max" labels distributed evenly so the
       longer wording stays readable on a phone (left / center / right within each third). */
    .benchmark-meta span { flex: 1; min-width: 0; }
    .benchmark-meta span:nth-child(2) { text-align: center; }
    .benchmark-meta span:nth-child(3) { text-align: right; }

    .benchmark-note {
      margin-top: 8px;
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: baseline;
      font-size: 0.78rem;
      line-height: 1.35;
    }

    .benchmark-note.good {
      color: #166534;
    }

    .benchmark-note.warning {
      color: #c2410c;
    }

    .benchmark-note.subtle {
      color: var(--text-muted);
    }

    .benchmark-note-title {
      font-size: 0.76rem;
      font-weight: 700;
    }

    .benchmark-note-text {
      font-size: 0.76rem;
      line-height: 1.35;
    }

    .lower-better {
      font-size: 0.75rem;
      color: var(--text-muted);
      font-style: italic;
    }

    .year-select {
      padding: 8px 12px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 10px;
      font-family: inherit;
      font-size: 0.85rem;
      background: white;
      color: var(--text-secondary);
    }

    .year-select:disabled {
      opacity: 0.85;
      cursor: not-allowed;
    }

    .retention-section {
      background: linear-gradient(180deg, #ffffff 0%, #fbfffc 100%);
    }

    .retention-empty-state {
      background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
      border: 1px dashed rgba(22, 163, 74, 0.18);
      border-radius: 20px;
    }

    .retention-stats-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 18px;
    }

    .retention-stat-card {
      padding: 18px;
      border-radius: 18px;
      border: 1px solid rgba(15, 23, 42, 0.06);
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .retention-stat-card.good {
      background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    }

    .retention-stat-card.danger {
      background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    }

    .retention-stat-eyebrow {
      font-size: 0.76rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      font-weight: 700;
    }

    .retention-stat-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 2rem;
      font-weight: 700;
      line-height: 1.1;
      margin-top: 8px;
      color: var(--text-primary);
    }

    .retention-stat-sub {
      margin-top: 8px;
      font-size: 0.82rem;
      color: var(--text-secondary);
      line-height: 1.45;
    }

    /* H1/H2: year-over-year cancel trend chip. */
    .retention-yoy-chip {
      margin-top: 10px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 0.78rem;
      font-weight: 700;
    }
    .retention-yoy-chip small { font-weight: 600; opacity: 0.75; }
    .retention-yoy-chip .yoy-arrow { font-size: 0.9rem; line-height: 1; }
    .retention-yoy-chip.pos { background: rgba(22, 163, 74, 0.12); color: #15803d; }
    .retention-yoy-chip.neg { background: rgba(217, 119, 6, 0.14); color: #b45309; }
    .retention-yoy-chip.neutral { background: rgba(100, 116, 139, 0.14); color: #475569; }

    .retention-layout {
      display: grid;
      grid-template-columns: 1.3fr 1fr;
      gap: 16px;
      margin-bottom: 16px;
    }

    .retention-card {
      padding: 18px;
      border-radius: 20px;
      background: #ffffff;
      border: 1px solid rgba(15, 23, 42, 0.06);
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .retention-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 14px;
    }

    .retention-card-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text-primary);
    }

    .retention-card-subtitle {
      margin-top: 4px;
      font-size: 0.82rem;
      color: var(--text-muted);
    }

    .retention-stack-bar,
    .retention-split-bar,
    .retention-position-track {
      height: 18px;
      border-radius: 999px;
      overflow: hidden;
      position: relative;
      background: #e2e8f0;
    }

    .retention-stack-bar {
      display: flex;
      margin-bottom: 16px;
    }

    .retention-reason-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .retention-zero-state {
      padding: 18px;
      border-radius: 18px;
      background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
      color: #166534;
      font-size: 0.9rem;
      line-height: 1.5;
      border: 1px dashed rgba(22, 163, 74, 0.18);
    }

    .retention-reason-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      font-size: 0.84rem;
      color: var(--text-secondary);
    }

    .retention-reason-label {
      display: flex;
      align-items: center;
      gap: 9px;
      min-width: 0;
    }

    .retention-reason-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .retention-reason-metrics {
      display: inline-flex;
      gap: 12px;
      font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap;
    }

    .retention-split-bar {
      display: flex;
      margin: 6px 0 14px;
    }

    .retention-split-bar .controllable {
      background: linear-gradient(90deg, #f97316, #ef4444);
    }

    .retention-split-bar .uncontrollable {
      background: linear-gradient(90deg, #94a3b8, #64748b);
    }

    .retention-split-bar .neutral {
      background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
    }

    .retention-split-meta {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .retention-split-meta div {
      padding: 12px;
      border-radius: 16px;
      background: #f8fafc;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .retention-split-meta strong {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1rem;
      color: var(--text-primary);
    }

    .retention-split-meta span {
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .retention-message {
      margin-top: 14px;
      padding: 12px 14px;
      border-radius: 16px;
      font-size: 0.82rem;
      line-height: 1.5;
      font-weight: 500;
    }

    .retention-message.good {
      background: #f0fdf4;
      color: #166534;
    }

    .retention-message.warning {
      background: #fff7ed;
      color: #c2410c;
    }

    .retention-comparison-card {
      margin-top: 2px;
    }

    .retention-comparison-badge {
      padding: 7px 11px;
      border-radius: 999px;
      font-size: 0.76rem;
      font-weight: 700;
      white-space: nowrap;
    }

    .retention-comparison-badge.good {
      background: #f0fdf4;
      color: #166534;
    }

    .retention-comparison-badge.warning {
      background: #fff7ed;
      color: #c2410c;
    }

    .retention-position-track {
      margin-top: 10px;
      background: linear-gradient(90deg, #dcfce7 0%, #86efac 35%, #facc15 65%, #fb923c 100%);
      overflow: visible;
    }

    .retention-position-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(22, 163, 74, 0.2), rgba(249, 115, 22, 0.38));
    }

    .retention-position-marker {
      position: absolute;
      top: -22px;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    .retention-position-pin {
      width: 0;
      height: 0;
      border-left: 6px solid transparent;
      border-right: 6px solid transparent;
      border-top: 9px solid #0f172a;
    }

    .retention-position-label {
      padding: 2px 7px;
      border-radius: 999px;
      background: rgba(255,255,255,0.96);
      border: 1px solid rgba(15, 23, 42, 0.08);
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--text-primary);
    }

    .retention-position-marker.you .retention-position-label {
      background: #166534;
      color: white;
      border-color: rgba(22, 101, 52, 0.2);
    }

    .retention-position-scale {
      margin-top: 14px;
      display: flex;
      justify-content: space-between;
      font-size: 0.74rem;
      color: var(--text-muted);
    }

    /* Help Tooltips */
    .help-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--bg-secondary);
      color: var(--text-muted);
      font-size: 0.7rem;
      font-weight: 700;
      cursor: help;
      margin-left: 6px;
      position: relative;
      transition: all 0.2s;
      flex-shrink: 0;
    }

    .help-icon:hover {
      background: var(--accent-blue-light);
      color: var(--accent-blue);
    }

    .help-tooltip {
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 12px;
      width: 280px;
      box-shadow: var(--shadow-lg);
      z-index: 100;
      opacity: 0;
      visibility: hidden;
      transition: all 0.2s;
      pointer-events: none;
    }

    .help-icon:hover .help-tooltip {
      opacity: 1;
      visibility: visible;
    }

    .help-tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: var(--bg-card);
    }

    .help-tooltip-title {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 6px;
    }

    .help-tooltip-text {
      font-size: 0.8rem;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    /* WACU Grid */
    .wacu-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }

    .wacu-card {
      background: var(--bg-card-alt);
      border-radius: 10px;
      padding: 16px;
      text-align: center;
      border: 1px solid var(--border-subtle);
    }

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

    .wacu-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 4px;
    }

    .wacu-check {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      background: var(--accent-green-light);
      color: var(--accent-green);
      border-radius: 50%;
      font-size: 0.9rem;
    }

    .wacu-total {
      text-align: center;
      padding: 12px;
      background: var(--bg-secondary);
      border-radius: 8px;
      font-size: 0.9rem;
      color: var(--text-secondary);
    }

    .wacu-total strong { color: var(--text-primary); }

    /* Sales Section */
    .sales-total {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.6rem;
      font-weight: 700;
      color: #15803d;
      margin-bottom: 20px;
    }

    .sales-total span {
      font-size: 1rem;
      font-weight: 500;
      color: var(--text-muted);
      margin-left: 8px;
    }

    .sales-bar-item { margin-bottom: 14px; }

    .sales-bar-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 6px;
    }

    .sales-program {
      font-weight: 600;
      font-size: 0.9rem;
    }

    .sales-count {
      font-family: 'JetBrains Mono', monospace;
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--text-secondary);
    }

    .sales-bar {
      height: 12px;
      background: var(--bg-secondary);
      border-radius: 6px;
      overflow: hidden;
    }

    .sales-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent-green), var(--accent-lime));
      border-radius: 6px;
    }


    .sales-summary-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 12px;
      margin: 16px 0;
    }

    .sales-summary-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 14px 16px;
    }

    .sales-summary-label {
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 8px;
    }

    .sales-summary-value {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.35rem;
      font-weight: 700;
      color: var(--text-primary);
    }

    .sales-summary-sub {
      margin-top: 6px;
      font-size: 0.85rem;
      color: var(--text-secondary);
    }

    .sales-source-note {
      margin: 8px 0 16px;
      padding: 12px 14px;
      border-radius: 10px;
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.24);
      color: var(--text-primary);
      font-size: 0.9rem;
    }

    .sales-breakdown-heading {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin: 8px 0 12px;
      font-weight: 700;
      color: var(--text-primary);
    }

    .sales-breakdown-heading span {
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--text-muted);
    }

    /* Time Off Section */
    .vacation-balance {
      background: var(--accent-green-light);
      border-radius: 10px;
      padding: 16px 20px;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .vacation-icon { font-size: 1.5rem; }

    .vacation-text { font-weight: 600; }

    .vacation-text span {
      color: var(--text-muted);
      font-weight: 400;
    }

    .time-off-list { margin-bottom: 20px; }

    .time-off-heading {
      font-weight: 600;
      font-size: 0.9rem;
      color: var(--text-secondary);
      margin-bottom: 10px;
    }

    .time-off-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid var(--border-subtle);
    }

    .time-off-item:last-child { border-bottom: none; }

    .time-off-date {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.85rem;
      color: var(--text-muted);
      min-width: 80px;
    }

    .time-off-reason { font-size: 0.9rem; }

    .no-data {
      text-align: center;
      padding: 20px;
      color: var(--text-muted);
    }

    /* Empty States */
    .empty-state {
      text-align: center;
      padding: 48px 24px;
      background: var(--bg-secondary);
      border-radius: 12px;
      margin: 16px 0;
    }

    .empty-state-icon {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.7;
    }

    .empty-state-title {
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 8px;
    }

    .empty-state-message {
      color: var(--text-muted);
      font-size: 0.95rem;
      max-width: 300px;
      margin: 0 auto 16px;
      line-height: 1.5;
    }

    .empty-state-action {
      display: inline-block;
      padding: 10px 20px;
      background: var(--accent-green);
      color: white;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 500;
      font-size: 0.9rem;
    }

    .empty-state-action:hover {
      opacity: 0.9;
    }

    /* Export Button */
    .export-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      color: var(--text-secondary);
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.2s;
    }

    .export-btn:hover {
      background: var(--bg-tertiary);
      color: var(--text-primary);
    }

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

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
    }

    .section-header .section-title {
      margin-bottom: 0;
    }

    /* Help Tooltips */
    .help-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      background: var(--bg-secondary);
      border-radius: 50%;
      font-size: 11px;
      color: var(--text-muted);
      cursor: help;
      margin-left: 6px;
      position: relative;
    }

    .help-icon:hover {
      background: var(--accent-green);
      color: white;
    }

    .help-tooltip {
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 12px 16px;
      width: 250px;
      box-shadow: var(--shadow-lg);
      z-index: 100;
      display: none;
      text-align: left;
      font-size: 0.85rem;
      line-height: 1.5;
    }

    .help-icon:hover .help-tooltip {
      display: block;
    }

    .help-tooltip-title {
      font-weight: 600;
      margin-bottom: 4px;
      color: var(--text-primary);
    }

    .help-tooltip-content {
      color: var(--text-muted);
    }

    /* Reviews Section */
    .reviews-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }

    .review-card {
      background: var(--bg-card-alt);
      border-radius: 10px;
      padding: 20px;
      border: 1px solid var(--border-subtle);
      position: relative;
      transition: transform 0.2s, box-shadow 0.2s;
      cursor: pointer;
    }

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

    .review-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: var(--accent-blue);
      color: white;
      font-size: 0.65rem;
      font-weight: 700;
      padding: 4px 8px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .review-title {
      font-weight: 700;
      font-size: 1rem;
      margin-bottom: 4px;
    }

    .review-date {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin-bottom: 12px;
    }

    .review-reviewer {
      font-size: 0.8rem;
      color: var(--text-secondary);
      margin-bottom: 16px;
    }

    .review-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      font-family: 'Outfit', sans-serif;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-primary);
      cursor: pointer;
      transition: all 0.2s;
    }

    .review-btn:hover {
      background: var(--accent-green-light);
      border-color: var(--accent-green);
      color: var(--accent-green);
    }

    /* Error state */
    .error-message {
      background: var(--accent-red-light);
      border: 1px solid var(--accent-red);
      color: var(--accent-red);
      padding: 16px 20px;
      border-radius: var(--radius);
      margin-bottom: 24px;
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .stats-grid { grid-template-columns: repeat(3, 1fr); }
      .wacu-grid { grid-template-columns: repeat(3, 1fr); }
    }

    @media (max-width: 768px) {
      .container { padding: 16px; }
      .welcome-section { padding: 20px; }

      .welcome-header {
        flex-direction: column;
        text-align: center;
      }

      .welcome-text h1 { font-size: 1.4rem; }

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

      .stat-card { padding: 14px; }
      .stat-value { font-size: 1.4rem; }

      .wacu-grid { grid-template-columns: repeat(2, 1fr); }
      .wacu-card:last-child { grid-column: span 2; }

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

      .header-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
      }

      .header-right {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        flex: 1 1 100%;
        width: 100%;
        justify-content: flex-start;
      }

      .header-right > * {
        min-width: 0;
      }

      .customize-btn,
      .manager-tab,
      .sign-out-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
      }

      .section-card { padding: 16px; }
      .section-title { font-size: 1rem; }

      .benchmark-header,
      .trend-chart-meta,
      .retention-card-header { flex-direction: column; align-items: flex-start; }
      .benchmark-value-group { width: 100%; justify-content: space-between; }
      .benchmark-value-stack { text-align: left; }
      .benchmark-bar-container { height: 16px; }
      .benchmark-label { font-size: 0.85rem; }
      .lower-better { display: block; margin-left: 0; margin-top: 2px; }
      .trend-chart { padding: 16px; min-height: 220px; }
      .trend-svg { height: auto; }
      .trend-tabs { width: 100%; }
      .retention-stats-grid,
      .trend-indicators,
      .trend-period-metrics,
      .retention-layout,
      .retention-split-meta { grid-template-columns: 1fr; }
      .trend-period-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .retention-reason-row { align-items: flex-start; flex-direction: column; }

      .review-card { padding: 16px; }
      .review-btn { width: 100%; justify-content: center; }
    }

    @media (max-width: 480px) {
      .stats-grid { grid-template-columns: 1fr 1fr; }
      .wacu-grid { grid-template-columns: 1fr 1fr; }
      .sales-total { font-size: 2rem; }
      .trend-indicators { grid-template-columns: 1fr; }
      .trend-tab { flex: 1 1 calc(50% - 4px); text-align: center; }
      .trend-window-toggle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
      .trend-window-btn { min-height: 44px; padding: 6px 8px; }
      .trend-chart-insights { grid-template-columns: 1fr 1fr; }
      .trend-period-metrics { grid-template-columns: 1fr 1fr; }
      .trend-period-metrics > div { padding: 10px; }
      .trend-period-metrics strong { font-size: 1.12rem; }
      .trend-axis-label { font-size: 11px; }
      .trend-axis-label.x-label { font-size: 10px; }
      .trend-avg-label { font-size: 11px; }
      .trend-data-table-wrap { overflow: visible; border: 0; }
      .trend-data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
      }
      .trend-data-table tbody,
      .trend-data-table tr,
      .trend-data-table th,
      .trend-data-table td { display: block; }
      .trend-data-table tbody { display: grid; gap: 8px; }
      .trend-data-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 10px;
        padding: 10px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #fff;
      }
      .trend-data-table tbody th,
      .trend-data-table tbody td { padding: 0; border: 0; }
      .trend-data-table tbody th { grid-column: 1; }
      .trend-data-table tbody td:first-of-type { grid-column: 2; grid-row: 1; text-align: right; }
      .trend-data-table tbody td:last-of-type { grid-column: 1 / -1; color: #64748b; font-size: 0.72rem; }
      .retention-position-label,
      .benchmark-avg-label { font-size: 0.62rem; }

      .header { padding: 12px 16px; }
      .header-inner { align-items: stretch; }
      .header-right {
        justify-content: flex-start;
        gap: 6px;
      }
      .user-menu-wrapper {
        margin-left: auto;
        order: -1;
      }
      .customize-btn,
      .manager-tab {
        padding: 7px 10px;
        font-size: 0.78rem;
      }
      .manager-tab { white-space: nowrap; }
      .sign-out-btn { padding: 7px 8px; }
      .user-dropdown {
        padding: 8px 10px;
        max-width: 100%;
      }
      .user-name {
        max-width: 82px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .back-link { font-size: 0.85rem; }

      .welcome-logo { width: 50px; }
      .welcome-text h1 { font-size: 1.2rem; }
      .welcome-text p { font-size: 0.9rem; }

      .stat-card { padding: 12px; }
      .stat-value { font-size: 1.2rem; }
      .stat-label { font-size: 0.7rem; }

      .wacu-value { font-size: 1.1rem; }
      .wacu-label { font-size: 0.65rem; }
    }

    /* Prevent horizontal scroll */
    html, body {
      overflow-x: hidden;
      max-width: 100vw;
    }

    /* Touch-friendly targets */
    @media (pointer: coarse) {
      .review-btn, .manager-tab, .user-dropdown {
        min-height: 44px;
      }
    }

    /* NEW badge indicator */
    .badge-item.is-new::after {
      content: 'NEW';
      position: absolute;
      top: -8px;
      right: -8px;
      background: linear-gradient(135deg, #ef4444, #dc2626);
      color: white;
      font-size: 9px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 8px;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
      animation: newBadgePulse 2s ease-in-out infinite;
      z-index: 10;
    }

    @keyframes newBadgePulse {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.1); opacity: 0.9; }
    }

    /* Contact Section Styles */
    .contact-section {
      background: var(--bg-card);
    }

    .contact-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }

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

    .contact-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .contact-field label {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .contact-field .field-icon {
      font-size: 1rem;
    }

    .contact-field .field-value {
      font-size: 1rem;
      color: var(--text-primary);
      padding: 10px 12px;
      background: var(--bg-secondary);
      border-radius: 8px;
      min-height: 42px;
      display: flex;
      align-items: center;
    }

    .contact-field .field-value.empty {
      color: var(--text-muted);
      font-style: italic;
    }

    .contact-field input,
    .contact-field select {
      font-family: 'Outfit', sans-serif;
      font-size: 1rem;
      padding: 10px 12px;
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      background: var(--bg-card);
      color: var(--text-primary);
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .contact-field input:focus,
    .contact-field select:focus {
      border-color: var(--accent-green);
      box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
      outline: none;
    }

    .contact-toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 0;
      border-bottom: 1px solid var(--border-subtle);
    }

    .contact-toggle-row:last-child {
      border-bottom: none;
    }

    .contact-toggle-label {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .contact-toggle-label .main {
      font-weight: 600;
      color: var(--text-primary);
    }

    .contact-toggle-label .sub {
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .contact-toggle {
      position: relative;
      width: 48px;
      height: 26px;
      background: var(--bg-secondary);
      border-radius: 13px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .contact-toggle.active {
      background: var(--accent-green);
    }

    .contact-toggle::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 20px;
      height: 20px;
      background: white;
      border-radius: 50%;
      transition: transform 0.2s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .contact-toggle.active::after {
      transform: translateX(22px);
    }

    .emergency-contact-card {
      background: var(--bg-secondary);
      border-radius: 12px;
      padding: 16px;
      margin-top: 16px;
    }

    .emergency-contact-card h4 {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .contact-actions {
      display: flex;
      gap: 12px;
      margin-top: 20px;
      padding-top: 20px;
      border-top: 1px solid var(--border-subtle);
    }

    .contact-edit-btn,
    .contact-save-btn,
    .contact-cancel-btn {
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      border: none;
      font-family: 'Outfit', sans-serif;
    }

    .contact-edit-btn {
      background: var(--accent-blue-light);
      color: var(--accent-blue);
    }

    .contact-edit-btn:hover {
      background: var(--accent-blue);
      color: white;
    }

    .contact-save-btn {
      background: var(--accent-green);
      color: white;
    }

    .contact-save-btn:hover {
      opacity: 0.9;
    }

    .contact-cancel-btn {
      background: var(--bg-secondary);
      color: var(--text-secondary);
    }

    .contact-cancel-btn:hover {
      background: var(--bg-card-alt);
    }

    .contact-verified {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.75rem;
      color: var(--accent-green);
      background: var(--accent-green-light);
      padding: 2px 8px;
      border-radius: 12px;
      margin-left: 8px;
    }

    .contact-unverified {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.75rem;
      color: var(--text-muted);
      background: var(--bg-secondary);
      padding: 2px 8px;
      border-radius: 12px;
      margin-left: 8px;
    }

    /* ===== ENHANCED FEEDBACK SECTION ===== */
    .feedback-toggle-group {
      display: flex;
      gap: 8px;
      margin-bottom: 20px;
      background: var(--bg-card-alt);
      padding: 6px;
      border-radius: 12px;
      width: fit-content;
    }

    .feedback-toggle-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 16px;
      border: none;
      border-radius: 8px;
      font-family: inherit;
      font-size: 0.9rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      background: transparent;
      color: var(--text-muted);
    }

    .feedback-toggle-btn:hover:not(.active) {
      background: rgba(0, 0, 0, 0.05);
      color: var(--text-secondary);
    }

    .feedback-toggle-btn.compliment.active {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: white;
      box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    }

    .feedback-toggle-btn.complaint.active {
      background: linear-gradient(135deg, #f59e0b, #d97706);
      color: white;
      box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    }

    .toggle-count {
      background: rgba(255, 255, 255, 0.2);
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 0.8rem;
      font-weight: 600;
    }

    .feedback-toggle-btn:not(.active) .toggle-count {
      background: rgba(0, 0, 0, 0.08);
    }

    /* AI Insights Container */
    .ai-insights-container {
      background: linear-gradient(135deg, rgba(147, 51, 234, 0.08), rgba(168, 85, 247, 0.04));
      border: 1px solid rgba(147, 51, 234, 0.2);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 20px;
    }

    .ai-insights-container.for-complaints {
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(234, 179, 8, 0.04));
      border-color: rgba(245, 158, 11, 0.2);
    }

    .ai-insights-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(147, 51, 234, 0.15);
    }

    .ai-insights-header .ai-icon { font-size: 1.2rem; }

    #aiInsightsTitle {
      font-weight: 600;
      font-size: 0.95rem;
      color: #7c3aed;
      flex: 1;
    }

    .ai-insights-container.for-complaints #aiInsightsTitle {
      color: #d97706;
    }

    .ai-refresh-btn {
      background: none;
      border: none;
      font-size: 1rem;
      cursor: pointer;
      color: var(--text-muted);
      padding: 4px 8px;
      border-radius: 6px;
      transition: all 0.2s;
    }

    .ai-refresh-btn:hover {
      background: rgba(0, 0, 0, 0.05);
      color: var(--text-primary);
    }

    .ai-insights-content {
      font-size: 0.9rem;
      line-height: 1.6;
      color: var(--text-secondary);
    }

    .ai-insights-content ul {
      margin: 0;
      padding-left: 0;
      list-style: none;
    }

    .ai-insights-content li {
      padding: 6px 0;
      display: flex;
      align-items: flex-start;
      gap: 8px;
    }

    .ai-insights-content li > span {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .ai-insights-content li::before {
      content: '✓';
      color: #22c55e;
      font-weight: bold;
      flex-shrink: 0;
    }

    .ai-insights-container.for-complaints .ai-insights-content li::before {
      content: '→';
      color: #d97706;
    }

    .ai-insights-loading {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-muted);
      font-style: italic;
    }

    .ai-insights-loading::before {
      content: '';
      width: 16px;
      height: 16px;
      border: 2px solid var(--border-subtle);
      border-top-color: #7c3aed;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    /* Enhanced Feedback Cards */
    .feedback-card.enhanced {
      background: var(--bg-card);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 12px;
      border-left: 4px solid var(--accent-green);
      box-shadow: var(--shadow-sm);
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .feedback-card.enhanced:hover {
      box-shadow: var(--shadow-sm);
    }

    .feedback-card.enhanced.compliment {
      border-left-color: var(--accent-green);
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.03), transparent);
    }

    .feedback-card.enhanced.complaint {
      border-left-color: #f59e0b;
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.03), transparent);
    }

    .feedback-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    /* Category Badges */
    .category-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      border-radius: 16px;
      font-size: 0.75rem;
      font-weight: 500;
      text-transform: capitalize;
    }

    .category-badge.service_quality {
      background: rgba(34, 197, 94, 0.12);
      color: #16a34a;
    }

    .category-badge.technician_behavior {
      background: rgba(59, 130, 246, 0.12);
      color: #2563eb;
    }

    .category-badge.communication {
      background: rgba(147, 51, 234, 0.12);
      color: #7c3aed;
    }

    .category-badge.timeliness {
      background: rgba(245, 158, 11, 0.12);
      color: #d97706;
    }

    .category-badge.results {
      background: rgba(34, 197, 94, 0.12);
      color: #16a34a;
    }

    .category-badge.billing {
      background: rgba(239, 68, 68, 0.12);
      color: #dc2626;
    }

    .category-badge.scheduling {
      background: rgba(59, 130, 246, 0.12);
      color: #2563eb;
    }

    .category-badge.other, .category-badge.general {
      background: rgba(100, 116, 139, 0.12);
      color: #64748b;
    }

    .feedback-date {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .date-icon { font-size: 0.85rem; }

    /* Quote Styling */
    .customer-quote {
      position: relative;
      font-size: 1rem;
      font-style: italic;
      color: var(--text-primary);
      line-height: 1.6;
      margin: 0 0 12px 0;
      padding: 12px 16px;
      background: rgba(0, 0, 0, 0.02);
      border-radius: 8px;
    }

    .quote-mark {
      color: var(--accent-green);
      font-size: 1.4rem;
      font-weight: 700;
      opacity: 0.4;
      line-height: 0;
      vertical-align: middle;
    }

    .feedback-card.complaint .quote-mark {
      color: #f59e0b;
    }

    .feedback-description {
      font-size: 0.9rem;
      color: var(--text-secondary);
      line-height: 1.5;
      margin: 0;
    }

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

    .customer-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .customer-name {
      font-size: 0.85rem;
      color: var(--text-secondary);
      font-weight: 500;
    }

    .customer-address {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .address-icon { font-size: 0.75rem; }

    .rating-stars {
      color: var(--rating-star);
      font-size: 0.9rem;
      letter-spacing: 1px;
    }

    /* Empty State */
    .feedback-empty-state {
      text-align: center;
      padding: 40px 20px;
      background: var(--bg-card-alt);
      border-radius: 12px;
    }

    .feedback-empty-state .empty-icon {
      font-size: 3rem;
      margin-bottom: 12px;
    }

    .feedback-empty-state .empty-title {
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .feedback-empty-state .empty-subtitle {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    /* Responsive */
    @media (max-width: 640px) {
      .feedback-toggle-group {
        width: 100%;
      }

      .feedback-toggle-btn {
        flex: 1;
        justify-content: center;
      }

      .toggle-label {
        display: none;
      }

      .feedback-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }

      .feedback-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
    }

/* ==================== POWER STATS BAR ==================== */

.profile-summary-group {
  margin-top: 18px;
}

.profile-summary-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
}

.profile-summary-copy {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.45;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.scope-chip.season {
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
  border-color: rgba(22, 163, 74, 0.18);
}

.scope-chip.live {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.18);
}

.scope-chip.legacy {
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.2);
}

.scope-chip.fallback {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.18);
}

.scope-chip.neutral {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-secondary, #374151);
  border-color: rgba(15, 23, 42, 0.08);
}

.stat-card .scope-chip {
  margin-top: 8px;
}

.stat-scope-line,
.power-stat-scope,
.live-stat-scope {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
}

.power-stat-scope {
  margin-top: 5px;
}

.profile-power-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light, #e5e7eb);
}

.power-stat {
  text-align: center;
  background: var(--bg-card-alt, #f9fafb);
  border-radius: 10px;
  padding: 12px 8px;
  transition: transform 0.15s;
}

.power-stat:hover {
  transform: translateY(-1px);
}

.power-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-green, #15803d);
  line-height: 1.2;
  transition: color 0.2s;
}

.power-stat-value.compliment.loaded { color: #16a34a; }
.power-stat-value.complaint.loaded { color: #dc2626; }

.power-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.live-stats-card {
  margin-top: 20px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.08), rgba(22, 101, 52, 0.02));
  border: 1px solid rgba(22, 101, 52, 0.12);
}

.live-stats-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.live-stats-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #166534;
}

.live-stats-title {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.live-stats-range {
  font-size: 0.82rem;
  color: var(--text-muted, #6b7280);
}

.live-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.live-stat-block {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.live-stat-block strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  color: var(--text-primary, #111827);
}

.live-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-stat-wash.good strong {
  color: #166534;
}

.live-stat-wash.warn strong {
  color: #a16207;
}

.live-stat-wash.bad strong {
  color: #b91c1c;
}

.live-comparison-grid {
  display: grid;
  gap: 10px;
}

.live-compare-item {
  display: grid;
  gap: 6px;
}

.live-compare-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary, #374151);
}

.live-compare-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.live-compare-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #166534, #22c55e);
}

@media (max-width: 480px) {
  .profile-power-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .live-stats-header {
    flex-direction: column;
  }
}

/* ==================== PROFILE CROSS-LINKS ==================== */
.profile-cross-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.profile-cross-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #166534;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 8px;
  transition: all 0.15s;
  font-family: 'Outfit', sans-serif;
}

.profile-cross-link:hover {
  border-color: #166534;
  background: #f0fdf4;
}

.profile-cross-link svg {
  flex-shrink: 0;
}

/* ==================== BADGE SHELF ==================== */
.badge-shelf-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-progress-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  margin-left: auto;
  background: var(--bg-card-alt, #f3f4f6);
  padding: 3px 10px;
  border-radius: 12px;
}

.badge-shelf-loading {
  text-align: center;
  padding: 24px;
  color: var(--text-muted, #6b7280);
  font-size: 0.9rem;
}

.badge-shelf-category {
  margin-bottom: 20px;
}

.badge-shelf-category:last-child {
  margin-bottom: 0;
}

.badge-shelf-category-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #6b7280);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}

.badge-shelf-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge-shelf-item {
  width: 72px;
  text-align: center;
  padding: 10px 4px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
  cursor: help;
}

.badge-shelf-item.earned {
  background: #f0fdf4;
  border-color: var(--accent-green, #2d5a3d);
}

.badge-shelf-item.locked {
  background: var(--bg-card-alt, #f9fafb);
  border-color: var(--border-light, #e5e7eb);
  opacity: 0.45;
}

.badge-shelf-item:hover {
  transform: scale(1.08);
}

.badge-shelf-item.locked:hover {
  opacity: 0.7;
}

/* Rarity glow effects for earned badges */
.badge-shelf-item.earned.rarity-legendary {
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}
.badge-shelf-item.earned.rarity-epic {
  border-color: #8b5cf6;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.25);
}
.badge-shelf-item.earned.rarity-rare {
  border-color: #3b82f6;
}

.badge-shelf-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 4px;
}

.badge-shelf-name {
  font-size: 0.6rem;
  color: var(--text-secondary, #4b5563);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-shelf-item.locked .badge-shelf-name {
  color: var(--text-muted, #9ca3af);
}

.badge-new-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* ===== MISSING CSS CLASSES — Added 2026-03-15 ===== */

/* Review Acknowledgment Section */
.review-acknowledge-section {
  background: var(--bg-card-alt, #f8fafc);
  border: 1px solid var(--border-subtle, rgba(0,0,0,0.08));
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.acknowledge-message {
  color: var(--text-secondary, #475569);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 14px;
}

.acknowledge-message p {
  margin: 0;
}

.review-acknowledged {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-green-light, rgba(34,197,94,0.1));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 16px;
  color: #166534;
  font-size: 0.9rem;
  font-weight: 500;
}

.review-acknowledged .icon {
  font-size: 1.2rem;
}

.review-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Form Group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

.form-group textarea,
.form-group input {
  padding: 10px 14px;
  border: 1px solid var(--border-subtle, rgba(0,0,0,0.12));
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary, #1e293b);
  background: var(--bg-card, #ffffff);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}

.form-group textarea:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--accent-green, #22c55e);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

/* Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-green, #22c55e);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card-alt, #f8fafc);
  color: var(--text-secondary, #475569);
  border: 1px solid var(--border-subtle, rgba(0,0,0,0.12));
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-secondary, #f1f5f9);
  border-color: var(--accent-green, #22c55e);
  color: var(--text-primary, #1e293b);
}

/* Badge Shelf Container */
.badge-shelf-container {
  min-height: 80px;
}

/* Comparison Bar Note */
.comparison-bar-note {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  font-style: italic;
  margin-top: 4px;
  padding-left: 4px;
  line-height: 1.4;
}

/* Feedback Card Body (team.js) */
.feedback-card-body {
  padding: 12px 16px;
  color: var(--text-secondary, #475569);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== PER-TECH-TYPE ENHANCEMENTS (v20260315) ===== */

/* Tech type badge in performance section header */
.period-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--blue-50, #eff6ff);
  color: var(--blue-600, #2563eb);
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: 8px;
  vertical-align: middle;
  border: 1px solid rgba(37,99,235,0.15);
  letter-spacing: 0.01em;
}
.tech-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-green-light, rgba(34,197,94,0.12));
  color: #166534;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 10px;
  border: 1px solid rgba(34,197,94,0.25);
}

/* Coming-soon badge on card headers */
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted, #64748b);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid #e2e8f0;
}

/* Truck cleanliness card */
.truck-clean-card .truck-clean-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  gap: 10px;
}
.truck-clean-placeholder-icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
}
.truck-clean-placeholder-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}
.truck-clean-placeholder-body {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  max-width: 340px;
  line-height: 1.55;
}

/* Truck cleanliness live stats layout */
.truck-clean-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.truck-clean-stat {
  background: var(--bg-card-alt, #f8fafc);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.truck-clean-stat.good .truck-clean-stat-value { color: var(--accent-green, #15803d); }
.truck-clean-stat.warning .truck-clean-stat-value { color: #b45309; }
.truck-clean-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.truck-clean-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.truck-clean-stat-sub {
  font-size: 0.68rem;
  color: var(--text-secondary, #475569);
  margin-top: 4px;
}

/* Eval monthly chart wrapper */
.eval-monthly-chart {
  background: var(--bg-card-alt, #f8fafc);
  border-radius: 10px;
  padding: 14px 12px;
}

/* PEV reason drilldown: lazy-loaded, privacy-scoped detail within the season card. */
.pev-reason-panel {
  border-radius: 8px;
}

.pev-reason-panel > summary {
  min-height: 44px;
}

.pev-reason-panel > summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
}

.pev-reason-body {
  min-width: 0;
  padding-top: 18px;
}

.pev-reason-heading h3 {
  color: var(--text-primary, #0f172a);
  font-size: 1rem;
  line-height: 1.3;
  margin: 0;
}

.pev-reason-heading p {
  color: var(--text-secondary, #475569);
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 4px 0 12px;
}

.pev-detail-state {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.5;
  padding: 14px;
}

.pev-detail-state.unavailable,
.pev-page-error {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.pev-table-wrap {
  max-width: 100%;
  overflow: visible;
}

.pev-detail-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.pev-detail-table th,
.pev-detail-table td {
  border-bottom: 1px solid #e2e8f0;
  color: var(--text-primary, #0f172a);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  word-break: normal;
}

.pev-detail-table th {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 750;
}

.pev-detail-table th:nth-child(1) { width: 13%; }
.pev-detail-table th:nth-child(2) { width: 14%; }
.pev-detail-table th:nth-child(3) { width: 24%; }
.pev-detail-table th:nth-child(4) { width: 34%; }
.pev-detail-table th:nth-child(5) { width: 15%; }

.pev-address {
  white-space: pre-line;
}

.pev-missing {
  color: #64748b;
  font-style: italic;
}

.pev-summary-action-cell {
  text-align: right !important;
}

.pev-summary-toggle,
.pev-summary-retry {
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  min-height: 36px;
  padding: 7px 9px;
  width: 100%;
}

.pev-summary-toggle:hover:not(:disabled),
.pev-summary-retry:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #64748b;
}

.pev-summary-toggle:focus-visible,
.pev-summary-retry:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.pev-summary-toggle:disabled {
  cursor: wait;
  opacity: 0.7;
}

.pev-summary-row td {
  background: #f8fafc;
  border-bottom-color: #cbd5e1;
  padding: 0 8px 12px;
}

.pev-summary-panel {
  border-left: 3px solid #64748b;
  color: #334155;
  padding: 12px 14px;
}

.pev-summary-heading {
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 800;
}

.pev-summary-meta {
  color: #64748b;
  font-size: 0.7rem;
  margin-top: 2px;
}

.pev-summary-note {
  font-size: 0.82rem;
  line-height: 1.55;
  margin-top: 8px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.pev-summary-state {
  font-size: 0.8rem;
  line-height: 1.5;
}

.pev-summary-state.unavailable {
  color: #9a3412;
  margin-bottom: 10px;
}

.pev-summary-retry {
  max-width: 190px;
  width: auto;
}

.pev-detail-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  margin-top: 12px;
}

.pev-record-status {
  color: #475569;
  font-size: 0.78rem;
  margin: 0;
}

.pev-action-btn {
  background: #ffffff;
  border: 1px solid #2563eb;
  border-radius: 6px;
  color: #1d4ed8;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 12px;
}

.pev-action-btn:hover:not(:disabled) {
  background: #eff6ff;
}

.pev-action-btn:focus-visible,
.pev-record-status:focus-visible,
.pev-detail-state:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.pev-action-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.pev-page-error {
  border: 1px solid;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 10px 12px;
  width: 100%;
}

.pev-reference-context {
  border-top: 1px solid #e2e8f0;
  margin-top: 18px;
  padding-top: 16px;
}

@media (max-width: 640px) {
  .pev-detail-table,
  .pev-detail-table tbody,
  .pev-detail-table tr,
  .pev-detail-table td {
    display: block;
    width: 100%;
  }

  .pev-detail-table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .pev-detail-table tr {
    border-bottom: 1px solid #cbd5e1;
    padding: 8px 0;
  }

  .pev-detail-table td {
    border: 0;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(94px, 34%) minmax(0, 1fr);
    padding: 7px 2px;
  }

  .pev-detail-table td::before {
    color: #475569;
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 750;
  }

  .pev-detail-table .pev-summary-row {
    padding: 0;
  }

  .pev-detail-table .pev-summary-row td {
    display: block;
    padding: 0 2px 12px;
  }

  .pev-detail-table .pev-summary-row td::before {
    content: none;
  }

  .pev-summary-action-cell {
    align-items: center;
  }

  .pev-summary-toggle {
    max-width: 180px;
    justify-self: end;
  }

  .pev-detail-footer,
  .pev-action-btn {
    width: 100%;
  }
}

/* ===== END PER-TECH-TYPE ENHANCEMENTS ===== */

/* ===== TECHNICIAN PROFILE DESIGN SYSTEM REFINEMENTS ===== */
.profile-panel-grid,
.metric-lane-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-metric-panel,
.metric-lane,
.profile-detail-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.profile-panel-eyebrow,
.metric-lane-eyebrow,
.profile-metric-eyebrow {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-panel-title {
  color: var(--text-primary);
  font-size: 1.02rem;
  font-weight: 700;
  margin: 2px 0 12px;
}

.metric-lane-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.metric-lane-header h3 {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 750;
  margin: 2px 0 0;
}

.metric-lane-header p {
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 340px;
  text-align: right;
}

.metric-lane.production {
  border-top: 3px solid rgba(34, 197, 94, 0.7);
}

.metric-lane.route {
  border-top: 3px solid rgba(59, 130, 246, 0.65);
}

/* "Your Growth" — bright, celebratory accent (positive building-block stats). */
.metric-lane.growth {
  border-top: 3px solid rgba(22, 163, 74, 0.9);
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.05), transparent 120px);
}
.metric-lane.growth .metric-lane-eyebrow { color: #16a34a; }

.metric-lane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-metric-card {
  min-height: 124px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #ffffff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-metric-card.good {
  background: linear-gradient(180deg, #ffffff 0%, rgba(34, 197, 94, 0.055) 100%);
}

.profile-metric-card.warning {
  background: linear-gradient(180deg, #ffffff 0%, rgba(234, 179, 8, 0.08) 100%);
}

.profile-metric-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.profile-metric-label {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.profile-metric-value {
  color: var(--text-primary);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.profile-metric-sub,
.profile-metric-detail,
.profile-metric-help,
.profile-detail-copy {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.4;
}

.profile-metric-detail,
.profile-metric-help {
  margin-top: 10px;
}

.profile-detail-panel {
  margin-top: 18px;
}

.profile-detail-panel summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 750;
  list-style: none;
}

.profile-detail-panel summary::-webkit-details-marker {
  display: none;
}

.profile-detail-panel summary::after {
  content: '+';
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.profile-detail-panel[open] summary::after {
  content: '−';
}

.feedback-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.feedback-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  background: #ffffff;
}

.feedback-summary-card.compliment {
  background: linear-gradient(180deg, #ffffff 0%, rgba(34, 197, 94, 0.075) 100%);
}

.feedback-summary-card.complaint {
  background: linear-gradient(180deg, #ffffff 0%, rgba(59, 130, 246, 0.055) 100%);
}

.feedback-summary-value {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  min-width: 40px;
}

.feedback-summary-label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 750;
}

.feedback-summary-sub {
  color: var(--text-secondary);
  font-size: 0.76rem;
  margin-top: 2px;
}

.feedback-expand-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: var(--bg-card-alt);
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}

.feedback-expand-btn:hover {
  border-color: rgba(34, 197, 94, 0.45);
  color: #15803d;
}

@media (max-width: 900px) {
  .profile-panel-grid,
  .metric-lane-layout {
    grid-template-columns: 1fr;
  }

  .metric-lane-header {
    flex-direction: column;
    gap: 6px;
  }

  .metric-lane-header p {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .metric-lane-grid,
  .feedback-summary-grid {
    grid-template-columns: 1fr;
  }

  .profile-metric-main {
    flex-direction: column;
  }

  .profile-metric-value {
    text-align: left;
  }
}

/* ===== END TECHNICIAN PROFILE DESIGN SYSTEM REFINEMENTS ===== */

/* ===== END MISSING CSS CLASSES ===== */

/* Tap-to-open help tooltips on touch devices (hover is unavailable on mobile,
   the primary device for this page). The .help-open class is toggled in init.js. */
.help-icon.help-open .help-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

/* ===== WS1/WS2 PROFILE ADDITIONS — per-round WACCU + comparison lane ===== */

/* "How You Compare" benchmark lane */
.metric-lane.compare {
  border-left: 4px solid var(--accent-blue, #2563eb);
  background: var(--bg-card, #fff);
}
.benchmark-list {
  display: grid;
  gap: 14px;
}

/* Per-round WACCU overview matrix */
.wacu-round-matrix {
  margin-top: 18px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: 14px;
  background: var(--bg-card, #fff);
  overflow: hidden;
}
.wacu-round-matrix-head {
  padding: 14px 16px;
  background: var(--bg-secondary, #f8fafc);
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}
.wacu-round-matrix-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}
.wacu-round-matrix-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}
.wacu-round-row {
  border-bottom: 1px solid var(--border-subtle, #eef2f7);
}
.wacu-round-row:last-of-type { border-bottom: none; }
.wacu-round-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  min-height: 52px; /* comfortable tap target on mobile */
  transition: background 0.15s;
}
.wacu-round-summary::-webkit-details-marker { display: none; }
.wacu-round-summary:hover { background: var(--bg-secondary, #f8fafc); }
.wacu-round-summary.muted { cursor: default; opacity: 1; background: var(--bg-secondary, #f8fafc); }
.wacu-round-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary, #0f172a);
  min-width: 80px;
}
.wacu-round-metrics {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-left: auto;
}
.wacu-round-cpl {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-blue, #2563eb);
}
.wacu-round-cpl small { font-size: 0.7rem; font-weight: 600; color: var(--text-muted, #64748b); }
.wacu-round-total {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}
.wacu-round-top {
  flex-basis: 100%;
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
}
.wacu-round-stat { margin-left: auto; font-size: 0.82rem; color: var(--text-muted, #64748b); }
.wacu-round-detail, .wacu-round-drill-detail {
  padding: 4px 16px 16px;
  display: grid;
  gap: 14px;
}
.wacu-round-cat {
  border: 1px solid var(--border-subtle, #eef2f7);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary, #f8fafc);
}
.wacu-round-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-primary, #0f172a);
}
.wacu-round-cat-label { font-weight: 600; }
.wacu-round-note {
  padding: 10px 16px 14px;
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
  line-height: 1.45;
}
.wacu-round-select { margin-right: 8px; }

@media (max-width: 480px) {
  .wacu-round-metrics { gap: 10px; }
  .wacu-round-name { min-width: 64px; }
  .wacu-round-cpl { font-size: 0.98rem; }
}

/* A1: Expand-history toggle for compliments/complaints (season ↔ all-time) */
.feedback-history-toggle {
  margin: 4px 0 12px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border-subtle, #e5e7eb); background: var(--bg-secondary, #f8fafc);
  color: #1d4ed8; font-size: 0.82rem; font-weight: 650; cursor: pointer;
}
.feedback-history-toggle:hover { background: var(--accent-blue-light, #eff6ff); }
.feedback-history-toggle:disabled { cursor: wait; opacity: 0.65; }
.feedback-history-status {
  min-height: 20px;
  margin: -6px 0 10px;
  color: var(--text-secondary, #475569);
  font-size: 0.78rem;
}
.feedback-list-window {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
  color: var(--text-secondary, #475569);
  font-size: 0.78rem;
  font-weight: 650;
}
.feedback-list-window span:last-child { text-align: right; }
.feedback-row-warning {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid #b45309;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.78rem;
}

@media (max-width: 480px) {
  .feedback-list-window { align-items: flex-start; flex-direction: column; gap: 3px; }
  .feedback-list-window span:last-child { text-align: left; }
}

/* "You" marker on benchmark bars (the tech's own value) — below the bar so it
   doesn't collide with the "Avg" pin above. */
.benchmark-bar-shell { padding-bottom: 22px; }
/* "You" sits ON the number line (centered on the track), a prominent blue dot above the
   gray company bubbles, with the label tucked just below the track. */
.benchmark-you-marker {
  position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 3;
}
.benchmark-you-dot {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-blue, #2563eb); border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.18);
}
.benchmark-you-label {
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  font-size: 0.6rem; font-weight: 800; color: var(--accent-blue, #2563eb); white-space: nowrap;
}
/* Company reference points plotted ON the track as bubbles: Min (left), Avg (mid), Max
   (right) — so the tech can see where they fall on a clear number line. Neutral gray; the
   Avg is a touch darker/larger to stand out. The blue "You" dot (z-index 3) sits on top. */
.benchmark-co-bubble {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 13px; height: 13px; border-radius: 50%; z-index: 1;
  background: #64748b; border: 2px solid #fff;
}
.benchmark-co-bubble.bm-avg { width: 15px; height: 15px; background: #1e293b; }

/* Lawns benchmark round toggle */
.lawns-bench-block { margin-bottom: 14px; }
.lawns-bench-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.lawns-bench-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary, #0f172a); }
.lawns-round-select { max-width: 100%; }

/* WS6c — section headers (title + badges + action selects) must wrap on mobile.
   Without this the title's inline period/tech badges plus the year/round selects
   overflow the viewport on phones (the primary device). */
@media (max-width: 600px) {
  .section-header { flex-wrap: wrap; gap: 10px; }
  .section-header .section-title { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
  .section-actions { flex-wrap: wrap; width: 100%; }
  .section-actions .year-select { flex: 1 1 auto; min-width: 0; }
}

/* Pest + tree profile: personal attribution and shared department context. */
.department-territory-badge {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}
.department-context-lane {
  border: 1px solid #c7d2fe;
  background: linear-gradient(145deg, #f8faff, #eef2ff);
}
.department-context-lane .metric-lane-eyebrow { color: #4338ca; }
.field-metric-footnote {
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.78rem;
  line-height: 1.45;
}
.field-trends .trend-tab { min-height: 44px; }
.field-delivery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-service-mix-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.field-service-mix-heading h4 { margin: 0; color: var(--text-primary); font-size: 0.92rem; }
.field-service-mix-heading p,
.field-service-mix-heading > span { margin: 3px 0 0; color: var(--text-muted); font-size: 0.72rem; }
.field-service-mix-list { display: grid; gap: 8px; }
.field-service-mix-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 1.5fr) 72px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-card, #fff);
}
.field-service-mix-row:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.25); outline-offset: 2px; }
.field-service-mix-label { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.field-service-mix-label strong { min-width: 38px; color: var(--text-primary); font-size: 0.8rem; }
.field-service-mix-label span { overflow: hidden; color: var(--text-secondary); font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap; }
.field-service-mix-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.field-service-mix-track span { display: block; height: 100%; min-width: 3px; border-radius: inherit; }
.field-service-mix-value { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; }
.field-service-mix-value strong { color: var(--text-primary); font-size: 0.84rem; }
.field-service-mix-value span { color: var(--text-muted); font-size: 0.68rem; }

@media (max-width: 720px) {
  .field-delivery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-service-mix-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .field-service-mix-row { grid-template-columns: minmax(112px, 0.9fr) minmax(80px, 1.2fr) 62px; gap: 8px; }
  .field-trends .trend-tabs {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .field-trends .trend-tab { flex: 0 0 auto; min-height: 44px; scroll-snap-align: start; }
}

@media (max-width: 480px) {
  .field-delivery-grid { grid-template-columns: 1fr 1fr; }
  .field-service-mix-row { grid-template-columns: 1fr 58px; }
  .field-service-mix-label { grid-column: 1 / -1; }
  .field-service-mix-track { grid-column: 1; }
  .field-service-mix-value { grid-column: 2; }
}

/* Personal completed Tree Evaluations (TEV). */
.tev-experience {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #bbd8c4;
  border-radius: 16px;
  background: linear-gradient(145deg, #f7fcf8 0%, #eef8f1 100%);
  box-shadow: 0 10px 28px rgba(20, 83, 45, 0.08);
}
.tev-experience > summary { list-style: none; }
.tev-experience > summary::-webkit-details-marker { display: none; }
.tev-experience-summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px 16px;
  cursor: pointer;
  color: #123d23;
  background: linear-gradient(100deg, rgba(255,255,255,0.92), rgba(231,247,235,0.78));
}
.tev-experience-summary:focus-visible,
.tev-action:focus-visible,
.tev-summary-block > summary:focus-visible,
.tev-detail-footer [data-tev-status]:focus-visible,
.tev-empty:focus-visible,
.tev-loading:focus-visible {
  outline: 3px solid rgba(22, 101, 52, 0.3);
  outline-offset: -3px;
}
.tev-experience-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #b7dbc2;
  border-radius: 13px;
  background: #fff;
  font-size: 1.45rem;
  box-shadow: 0 4px 12px rgba(20, 83, 45, 0.08);
}
.tev-experience-title { display: grid; min-width: 0; gap: 2px; }
.tev-experience-title strong { color: #123d23; font-size: 1rem; line-height: 1.25; }
.tev-experience-title > span:last-child { color: #4b6b56; font-size: 0.76rem; line-height: 1.35; }
.tev-experience-eyebrow {
  color: #238044;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tev-experience-count {
  min-width: 48px;
  color: #123d23;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: right;
}
.tev-experience-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #9ac8a8;
  border-radius: 999px;
  background: #fff;
  color: #166534;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}
.tev-experience[open] .tev-experience-summary { border-bottom: 1px solid #cce3d2; }
.tev-experience-body { padding: 16px; }
.tev-experience-copy {
  margin: 0 0 14px;
  color: #3f5f4a;
  font-size: 0.8rem;
  line-height: 1.5;
}
.tev-loading,
.tev-empty,
.tev-coverage-note {
  padding: 14px;
  border: 1px solid #cddfd2;
  border-radius: 12px;
  background: rgba(255,255,255,0.86);
  color: #355442;
  font-size: 0.8rem;
  line-height: 1.5;
}
.tev-empty { display: grid; gap: 3px; }
.tev-empty strong { color: #173e25; font-size: 0.88rem; }
.tev-empty.unavailable,
.tev-page-error {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}
.tev-coverage-note { margin-bottom: 14px; border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.tev-coverage-note strong { display: block; color: #1e40af; }
.tev-trend {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d7e6db;
  border-radius: 12px;
  background: rgba(255,255,255,0.82);
}
.tev-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tev-trend-head span { color: #355442; font-size: 0.74rem; font-weight: 750; }
.tev-trend-head strong { color: #173e25; font-family: "JetBrains Mono", monospace; font-size: 0.72rem; }
.tev-trend-bars {
  display: flex;
  align-items: end;
  gap: clamp(8px, 3vw, 18px);
  min-height: 98px;
  overflow-x: auto;
  padding: 4px 2px 0;
  scrollbar-width: thin;
}
.tev-trend-column {
  display: grid;
  grid-template-rows: 18px 64px 18px;
  align-items: end;
  justify-items: center;
  min-width: 34px;
}
.tev-trend-value { color: #275c39; font-family: "JetBrains Mono", monospace; font-size: 0.66rem; font-weight: 750; }
.tev-trend-bar {
  align-self: end;
  display: block;
  width: 24px;
  max-height: 64px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #4fba70, #238044);
  box-shadow: 0 4px 8px rgba(35, 128, 68, 0.16);
}
.tev-trend-label { color: #607568; font-size: 0.65rem; font-weight: 700; }
.tev-record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tev-record-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d5e3d9;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.045);
}
.tev-record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid #e3ece6;
  background: #f8fcf9;
}
.tev-record-header > div { display: grid; gap: 2px; }
.tev-record-header strong { color: #163c24; font-size: 0.86rem; }
.tev-record-kicker { color: #4f775d; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.tev-complete-badge {
  padding: 4px 8px;
  border: 1px solid #bbdfc5;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 0.64rem;
  font-weight: 800;
}
.tev-customer-block,
.tev-reason-block { padding: 12px 13px; }
.tev-customer-block { border-bottom: 1px solid #edf2ee; }
.tev-customer-name { overflow-wrap: anywhere; color: #17261d; font-size: 0.9rem; font-weight: 800; }
.tev-customer-meta { margin-top: 2px; color: #617168; font-family: "JetBrains Mono", monospace; font-size: 0.66rem; }
.tev-address { margin-top: 7px; color: #405249; font-size: 0.76rem; line-height: 1.45; white-space: pre-line; }
.tev-field-label { display: block; margin-bottom: 5px; color: #597065; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.tev-reason-block p,
.tev-summary-content p { margin: 0; overflow-wrap: anywhere; color: #293d31; font-size: 0.78rem; line-height: 1.52; white-space: pre-wrap; }
.tev-missing { color: #56645c !important; font-style: italic; }
.tev-summary-block { border-top: 1px solid #edf2ee; background: #fbfdfb; }
.tev-summary-block > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 9px 13px;
  cursor: pointer;
  list-style: none;
  color: #285638;
  font-size: 0.76rem;
  font-weight: 800;
}
.tev-summary-block > summary::-webkit-details-marker { display: none; }
.tev-summary-command { color: #238044; font-size: 0.68rem; }
.tev-summary-block[open] .tev-summary-command { font-size: 0; }
.tev-summary-block[open] .tev-summary-command::after { content: 'Hide'; font-size: 0.68rem; }
.tev-summary-content { padding: 0 13px 13px; }
.tev-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.tev-detail-footer p { margin: 0; color: #52675a; font-size: 0.74rem; }
.tev-action {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #238044;
  border-radius: 10px;
  background: #fff;
  color: #166534;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}
.tev-action:hover:not(:disabled) { background: #ecfdf3; }
.tev-action:disabled { cursor: wait; opacity: 0.68; }
.tev-page-error { width: 100%; padding: 10px 12px; border: 1px solid; border-radius: 10px; font-size: 0.76rem; }

@media (max-width: 820px) {
  .tev-record-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .tev-experience-summary {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 82px;
    padding: 12px;
  }
  .tev-experience-icon { width: 42px; height: 42px; }
  .tev-experience-command { grid-column: 2 / -1; justify-self: start; min-height: 36px; padding: 6px 10px; }
  .tev-experience-count { align-self: start; font-size: 1.3rem; }
  .tev-experience-title > span:last-child { display: none; }
  .tev-experience-body { padding: 12px; }
  .tev-trend { padding: 12px 10px; }
  .tev-detail-footer,
  .tev-action { width: 100%; }
  .tev-action { justify-content: center; }
}

/* ==================== OFFICE / CSR PROFILE (S4 Joy Layer) ==================== */
/* Reuses the technician design tokens (section-card, metric-lane-grid,
   profile-metric-card, feedback/quote styling). Recognition-led surfaces only. */

.office-widget-body { display: flex; flex-direction: column; gap: 14px; }

/*
 * The shared metric-card component predates the profile theme tokens and uses
 * hard-coded light gradients. Scope the correction to Office so a dark theme
 * never combines a white tile with the dark palette's light foreground text.
 */
[data-theme="dark"] .office-widget .profile-metric-card {
  background: #233247;
  border-color: var(--border-subtle);
}
[data-theme="dark"] .office-widget .profile-metric-card.good {
  background: #19352b;
}
[data-theme="dark"] .office-widget .profile-metric-card.warning {
  background: #3d341d;
}

/*
 * Office uses four cards per row on wide screens, so long currency and ratio
 * values cannot safely share one unbroken row with the metric label. Allow the
 * pair to wrap inside the card while keeping the value right-aligned. The
 * min-width reset is required for flex items containing long localized text.
 */
.office-widget .profile-metric-main {
  flex-wrap: wrap;
}
.office-widget .profile-metric-main > * {
  min-width: 0;
}
.office-widget .profile-metric-label {
  flex: 1 1 7.5rem;
}
.office-widget .profile-metric-value {
  flex: 0 1 auto;
  max-width: 100%;
  margin-left: auto;
  overflow-wrap: anywhere;
}

.office-call-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card-alt);
}
.office-call-admin > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.office-call-admin strong { color: var(--text-primary); font-size: 0.88rem; }
.office-call-admin span { color: var(--text-muted); font-size: 0.78rem; line-height: 1.4; }
.office-call-admin-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #15803d;
  border-radius: 9px;
  background: #15803d;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
}
.office-call-admin-button.secondary { background: transparent; color: #166534; }
.office-call-admin-button:hover { filter: brightness(0.96); }
.office-call-admin-button:disabled,
.call-extension-modal .modal-btn:disabled {
  cursor: wait;
  filter: grayscale(0.35);
  opacity: 0.58;
}
.office-call-admin-button:focus-visible,
.call-extension-modal .modal-close:focus-visible,
.call-extension-modal .modal-btn:focus-visible,
.call-extension-modal input:focus-visible,
.call-extension-modal select:focus-visible,
#callExtensionModalTitle:focus-visible {
  outline: 3px solid rgba(21, 128, 61, 0.25);
  outline-offset: 2px;
}

#callExtensionModal { padding: 24px; }
.call-extension-modal {
  width: min(720px, 100%);
  max-width: 720px;
  max-height: calc(100dvh - 48px);
}
.call-extension-modal .modal-header { align-items: flex-start; gap: 16px; }
.call-extension-modal .modal-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.call-extension-modal .modal-body {
  max-height: calc(100dvh - 150px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.call-extension-modal-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.call-extension-status {
  min-height: 24px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-card-alt);
  color: var(--text-secondary);
  font-size: 0.82rem;
}
.call-extension-status.success { background: rgba(22, 163, 74, 0.09); color: #166534; }
.call-extension-status.error { background: rgba(220, 38, 38, 0.08); color: #b91c1c; }
.call-extension-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.24);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.45;
}
.call-extension-error[hidden] { display: none; }
.call-extension-error .office-call-admin-button { flex: 0 0 auto; }
.call-extension-section-title {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.call-extension-list { display: flex; flex-direction: column; gap: 8px; }
.call-extension-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
}
.call-extension-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.call-extension-row strong { color: var(--text-primary); font-size: 0.86rem; }
.call-extension-row span { color: var(--text-muted); font-size: 0.75rem; line-height: 1.35; }
.call-extension-state {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-card-alt);
  font-size: 0.7rem !important;
  font-weight: 750;
}
.call-extension-row.current .call-extension-state { background: rgba(22, 163, 74, 0.1); color: #166534; }
.call-extension-row.scheduled .call-extension-state { background: rgba(37, 99, 235, 0.1); color: #1d4ed8; }
.call-extension-row.invalid .call-extension-state { background: rgba(220, 38, 38, 0.08); color: #b91c1c; }
.call-extension-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.call-extension-form[hidden] { display: none; }
.call-extension-modal .modal-btn.primary:hover {
  background: #166534;
  opacity: 1;
}
.call-extension-form h3 { margin: 0; color: var(--text-primary); font-size: 0.96rem; }
.call-extension-form > p { margin: -6px 0 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.45; }
.call-extension-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.call-extension-form label { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 0.78rem; font-weight: 700; }
.call-extension-form label span { color: var(--text-muted); font-weight: 500; }
.call-extension-form input,
.call-extension-form select {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.86rem;
}
.call-extension-privacy-hint { margin: 0 !important; }
.call-extension-form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.call-extension-form-actions .modal-btn { min-height: 44px; }

.office-widget-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.office-empty {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 14px 16px;
  background: var(--bg-card-alt);
  border: 1px dashed var(--border-subtle);
  border-radius: 10px;
}

/* Hero highlight — one warm line assembled server-side from the best real fact. */
.office-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(132, 204, 22, 0.06));
  border: 1px solid rgba(34, 197, 94, 0.22);
}
.office-hero-icon {
  flex: 0 0 auto;
  display: inline-flex;
  color: #16a34a;
}
.office-hero-text {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.4;
}
.office-hero-praise .office-hero-text { font-style: italic; }

/* Praise cards — reuse feedback-card / customer-quote look, compliment tone. */
.office-praise-list { display: flex; flex-direction: column; gap: 12px; }
.office-praise-card { margin-bottom: 0; }
.office-praise-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.office-praise-more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* Sold-by program mix. */
.office-mix { display: flex; flex-direction: column; gap: 8px; }
.office-mix-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.office-mix-row {
  display: grid;
  grid-template-columns: minmax(48px, 88px) 1fr auto;
  align-items: center;
  gap: 10px;
}
.office-mix-label { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.office-mix-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.office-mix-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #84cc16);
  min-width: 4px;
}
.office-mix-count { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* Time-clock confidence chip + non-accusatory disclaimer. */
.office-conf-chip { display: inline-flex; align-self: flex-start; }
.office-disclaimer {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 10px 12px;
  background: var(--accent-yellow-light);
  border-left: 3px solid var(--accent-yellow);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .office-mix-row { grid-template-columns: minmax(44px, 72px) 1fr auto; }
  .office-hero-text { font-size: 0.96rem; }
  .office-call-admin { align-items: stretch; flex-direction: column; }
  .office-call-admin-button { width: 100%; }
  #callExtensionModal { padding: 12px; align-items: flex-start; }
  .call-extension-modal { width: 100%; max-height: calc(100dvh - 24px); }
  .call-extension-modal .modal-header { padding: 16px; }
  .call-extension-modal .modal-body {
    max-height: calc(100dvh - 112px);
    padding: 14px 16px max(20px, env(safe-area-inset-bottom));
  }
  .call-extension-form-grid { grid-template-columns: 1fr; }
  .call-extension-row { grid-template-columns: minmax(0, 1fr) auto; }
  .call-extension-row .office-call-admin-button { grid-column: 1 / -1; }
  .call-extension-form-actions {
    flex-direction: column-reverse;
  }
  .call-extension-form-actions .modal-btn,
  .call-extension-error .office-call-admin-button {
    width: 100%;
  }
  .call-extension-error { align-items: stretch; flex-direction: column; }
}

/* Desktop density — match the technician card rhythm on wide screens.
   Office widgets have no metric-lane-layout wrapper (each widget is its own
   full-width section-card), so at the base 2-up their cards stretch to ~550px
   with the value floating far from the label. The technician profile renders
   ~290px cards 4-up (2 lanes x 2 cards). Reusing the SAME 900px breakpoint the
   technician design system already uses (see the .metric-lane-layout rule
   above), promote the office card grids to 4-up on desktop so they carry the
   same density; tablet stays 2-up and mobile 1-up via the existing rules. */
@media (min-width: 901px) {
  .office-widget .metric-lane-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /* Praise quote cards: cap the reading measure by flowing into two columns
     on desktop instead of one ~1100px-wide line. */
  .office-praise-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
}

/* Program-mix bars should not stretch the full 1200px container. */
.office-mix { max-width: 760px; }

/* ============================================================================
   OFFICE / CSR CHARTS DASHBOARD (office-charts-v1)
   Scoped under .office-widget so nothing collides with the technician profile
   or the rest of the portal. Every chart stroke/fill uses an --oc-* token that
   is defined in BOTH themes below (no undefined vars → no white halos in dark).
   ============================================================================ */
.office-widget {
  --oc-ink: #152219; --oc-ink-2: #3b4a40; --oc-muted: #6a776d;
  --oc-line: #dde4d9; --oc-line-soft: #e9efe6;
  --oc-card: #ffffff; --oc-card-2: #f5f8f4; --oc-card-3: #eef3ec;
  --oc-green: #16a34a; --oc-green-deep: #15803d; --oc-green-tint: #e7f6ed;
  --oc-accent: #2563eb; --oc-accent-tint: #e7effe;
  --oc-gold: #c1901f; --oc-gold-deep: #946c12; --oc-gold-tint: #faf1d8;
  --oc-band: #d6e2da; --oc-ring-track: #e6ece4; --oc-teal: #0e9488;
  --oc-pos: #15803d; --oc-neg: #b4531a; --oc-warn: #b45309; --oc-warn-tint: #fbf0df;
  --oc-c1: #16a34a; --oc-c2: #2563eb; --oc-c3: #c1901f; --oc-c4: #0e9488; --oc-c5: #7c5cd4; --oc-c6: #c2410c;
}
[data-theme="dark"] .office-widget {
  --oc-ink: #e9f0ea; --oc-ink-2: #c1cdc4; --oc-muted: #8a988d;
  --oc-line: #243028; --oc-line-soft: #1e2820;
  --oc-card: #141d17; --oc-card-2: #19231c; --oc-card-3: #1c2820;
  --oc-green: #3ecb74; --oc-green-deep: #5cd688; --oc-green-tint: #112a1b;
  --oc-accent: #6ea1ff; --oc-accent-tint: #132135;
  --oc-gold: #e0b657; --oc-gold-deep: #f0cd7f; --oc-gold-tint: #2a2213;
  --oc-band: #26362b; --oc-ring-track: #26332a; --oc-teal: #2dd4bf;
  --oc-pos: #5cd688; --oc-neg: #e6a35c; --oc-warn: #e6a35c; --oc-warn-tint: #2c2113;
  --oc-c1: #3ecb74; --oc-c2: #6ea1ff; --oc-c3: #e0b657; --oc-c4: #2dd4bf; --oc-c5: #a78bfa; --oc-c6: #fb923c;
}
/* Defensive fallback if a theme attr is ever missing (portal always sets one). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .office-widget {
    --oc-ink: #e9f0ea; --oc-ink-2: #c1cdc4; --oc-muted: #8a988d;
    --oc-line: #243028; --oc-line-soft: #1e2820;
    --oc-card: #141d17; --oc-card-2: #19231c; --oc-card-3: #1c2820;
    --oc-green: #3ecb74; --oc-green-deep: #5cd688; --oc-green-tint: #112a1b;
    --oc-accent: #6ea1ff; --oc-accent-tint: #132135;
    --oc-gold: #e0b657; --oc-gold-deep: #f0cd7f; --oc-gold-tint: #2a2213;
    --oc-band: #26362b; --oc-ring-track: #26332a; --oc-teal: #2dd4bf;
    --oc-pos: #5cd688; --oc-neg: #e6a35c; --oc-warn: #e6a35c; --oc-warn-tint: #2c2113;
    --oc-c1: #3ecb74; --oc-c2: #6ea1ff; --oc-c3: #e0b657; --oc-c4: #2dd4bf; --oc-c5: #a78bfa; --oc-c6: #fb923c;
  }
}

.office-widget .tnum { font-variant-numeric: tabular-nums; }
.office-widget .oc-rc { width: 100%; height: auto; display: block; overflow: visible; }
.office-widget .oc-sub-h { font-size: 0.85rem; font-weight: 750; color: var(--oc-ink); margin: 0 0 6px; letter-spacing: -0.01em; }
.office-widget .oc-cap { font-size: 0.72rem; color: var(--oc-muted); margin-top: 6px; line-height: 1.4; }
.office-widget .oc-cap .oc-dot { display: inline-block; vertical-align: middle; margin: 0 2px; }

/* period switcher */
.office-widget .oc-periodbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.office-widget .oc-segs { display: inline-flex; background: var(--oc-card-2); border: 1px solid var(--oc-line); border-radius: 999px; padding: 3px; gap: 2px; }
.office-widget .oc-segs button { border: 0; background: none; color: var(--oc-ink-2); font: inherit; font-size: 0.8rem; font-weight: 650; padding: 5px 12px; border-radius: 999px; cursor: pointer; min-height: 34px; }
.office-widget .oc-segs button[aria-checked="true"] { background: var(--oc-accent); color: #fff; }
.office-widget .oc-segs button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.office-widget .oc-period-ctx { font-size: 0.72rem; color: var(--oc-muted); }

/* scorecard */
.office-widget .oc-score { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.office-widget .oc-st { background: var(--oc-card-2); border: 1px solid var(--oc-line); border-radius: 14px; padding: 14px; }
.office-widget .oc-st:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.office-widget .oc-st .oc-k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--oc-muted); font-weight: 700; }
.office-widget .oc-st .oc-v { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin: 3px 0 2px; line-height: 1; color: var(--oc-ink); }
.office-widget .oc-st .oc-v small { font-size: 0.85rem; font-weight: 650; color: var(--oc-muted); }
.office-widget .oc-st-spark { margin-top: 6px; height: 30px; }
.office-widget .oc-st-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; justify-content: space-between; flex-wrap: wrap; }
.office-widget .oc-delta { font-size: 0.74rem; font-weight: 750; display: inline-flex; align-items: center; gap: 3px; }
.office-widget .oc-delta.up { color: var(--oc-pos); }
.office-widget .oc-delta.dn { color: var(--oc-neg); }
.office-widget .oc-delta-basis { color: var(--oc-muted); font-weight: 600; }
.office-widget .oc-arrow { flex: none; }
.office-widget .oc-rank { font-size: 0.72rem; font-weight: 700; color: var(--oc-ink-2); background: var(--oc-card-3); border: 1px solid var(--oc-line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

/* standing / radar */
.office-widget .oc-standing { margin-top: 16px; text-align: center; }
.office-widget .oc-radar-wrap { display: flex; justify-content: center; }
.office-widget .oc-radar { max-width: 240px; height: auto; }

/* generic tile grids */
.office-widget .oc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.office-widget .oc-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.office-widget .oc-tile { border: 1px solid var(--oc-line); border-radius: 13px; padding: 12px; background: var(--oc-card-2); }
.office-widget .oc-tile:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.office-widget .oc-tile-k { font-size: 0.72rem; color: var(--oc-ink-2); font-weight: 650; }
.office-widget .oc-tile-v { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; color: var(--oc-ink); }
.office-widget .oc-tile-s { font-size: 0.72rem; color: var(--oc-muted); margin-top: 2px; line-height: 1.4; }
.office-widget .oc-tile-s .oc-dot { display: inline-block; margin-right: 4px; }
.office-widget .oc-tile-flex { display: flex; gap: 12px; align-items: center; }
.office-widget .oc-tile-center { text-align: center; }
.office-widget .oc-toolq { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--oc-line); color: var(--oc-muted); font-size: 0.66rem; align-items: center; justify-content: center; margin-left: 5px; cursor: help; font-weight: 700; }

/* sales split (pie + channel) */
.office-widget .oc-split { align-items: start; }
.office-widget .oc-half { min-width: 0; }
.office-widget .oc-pie-row { display: flex; gap: 14px; align-items: center; }
.office-widget .oc-pie { max-width: 140px; height: auto; flex: none; }
.office-widget .oc-legend { display: flex; flex-direction: column; gap: 6px; }
.office-widget .oc-lgi { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--oc-ink-2); }
.office-widget .oc-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.office-widget .oc-dot-off { background: var(--oc-muted); opacity: 0.5; }
.office-widget .oc-hbars { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.office-widget .oc-hb { display: grid; grid-template-columns: 88px 1fr auto; gap: 9px; align-items: center; font-size: 0.78rem; }
.office-widget .oc-hb-lb { color: var(--oc-ink-2); font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-widget .oc-hb-tr { height: 10px; border-radius: 999px; background: var(--oc-card-3); overflow: hidden; }
.office-widget .oc-hb-fl { display: block; height: 100%; border-radius: 999px; background: var(--oc-accent); }
.office-widget .oc-hb-vl { font-weight: 700; color: var(--oc-ink); font-variant-numeric: tabular-nums; }

/* honest benchmark bar */
.office-widget .oc-bm { margin-top: 14px; }
.office-widget .oc-bm-top { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 700; color: var(--oc-ink-2); margin-bottom: 7px; gap: 8px; }
.office-widget .oc-bm-rank { color: var(--oc-green-deep); text-align: right; }
.office-widget .oc-bmtrack { position: relative; height: 8px; border-radius: 999px; background: var(--oc-card-3); margin: 14px 6px 6px; }
.office-widget .oc-bmband { position: absolute; top: 0; bottom: 0; background: var(--oc-band); border-radius: 999px; }
.office-widget .oc-bmmed { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--oc-muted); opacity: 0.7; }
.office-widget .oc-bmyou { position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--oc-green); border: 3px solid var(--oc-card); box-shadow: 0 0 0 1px var(--oc-green); }
.office-widget .oc-bm-lg { display: flex; justify-content: space-between; font-size: 0.66rem; color: var(--oc-muted); margin-top: 2px; }
.office-widget .oc-bmnote { font-size: 0.74rem; color: var(--oc-muted); margin-top: 12px; display: flex; gap: 6px; align-items: center; }

/* time & attendance */
.office-widget .oc-ring-row { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 6px; }
.office-widget .oc-ring-svg { max-width: 118px; height: auto; }
.office-widget .oc-ring-big { font-size: 1.5rem; font-weight: 800; color: var(--oc-ink); }
.office-widget .oc-gauge { max-width: 128px; height: auto; margin: 0 auto; }
.office-widget .oc-disc { margin-top: 10px; display: flex; gap: 8px; padding: 9px 11px; border-radius: 11px; background: var(--oc-warn-tint); border: 1px solid color-mix(in srgb, var(--oc-warn) 30%, transparent); font-size: 0.78rem; color: var(--oc-ink-2); text-align: left; }
.office-widget .oc-abs-wrap { margin-top: 14px; }
.office-widget .oc-abs { display: flex; gap: 3px; margin-top: 8px; flex-wrap: wrap; }
.office-widget .oc-absd { width: 14px; height: 14px; border-radius: 4px; background: var(--oc-card-3); }
.office-widget .oc-absd.pto { background: var(--oc-c2); }
.office-widget .oc-absd.off { background: var(--oc-muted); opacity: 0.5; }
.office-widget .oc-absd.sick { background: var(--oc-warn); }

/* empty / inline states */
.office-widget .oc-empty { padding: 22px 16px; text-align: center; color: var(--oc-muted); border: 1px dashed var(--oc-line); border-radius: 13px; background: var(--oc-card-2); font-size: 0.85rem; line-height: 1.5; }
.office-widget .oc-empty-t { font-weight: 700; color: var(--oc-ink-2); margin-bottom: 3px; }
.office-widget .oc-empty-inline { padding: 18px 12px; text-align: center; color: var(--oc-muted); font-size: 0.8rem; }

/* recognition: hero highlight (reuses .office-hero) + compliment carousel + records */
.office-widget .oc-carousel { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-top: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.office-widget .oc-carousel:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.office-widget .oc-rec-card { flex: 0 0 78%; scroll-snap-align: start; border: 1px solid color-mix(in srgb, var(--oc-gold) 32%, transparent); background: var(--oc-gold-tint); border-radius: 13px; padding: 12px 14px; position: relative; }
.office-widget .oc-quote-mark { color: var(--oc-gold-deep); font-size: 1.4rem; font-weight: 800; line-height: 0.6; }
.office-widget .oc-rec-quote { margin: 6px 0 8px; font-weight: 500; color: var(--oc-ink); font-size: 0.95rem; line-height: 1.45; }
.office-widget .oc-rec-foot { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.office-widget .oc-rec-author { font-size: 0.78rem; font-weight: 700; color: var(--oc-gold-deep); }
.office-widget .oc-rec-date { font-size: 0.72rem; color: var(--oc-muted); }
.office-widget .oc-praise-more { font-size: 0.78rem; color: var(--oc-muted); margin-top: 8px; font-weight: 600; }
.office-widget .oc-records { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.office-widget .oc-record { border: 1px solid var(--oc-line); border-radius: 12px; padding: 11px; background: var(--oc-card-2); text-align: center; }
.office-widget .oc-record-v { font-size: 1.15rem; font-weight: 800; color: var(--oc-gold-deep); }
.office-widget .oc-record-k { font-size: 0.68rem; color: var(--oc-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; margin-top: 2px; }

/* animation (reduced-motion aware) */
.office-widget .oc-rise { opacity: 0; transform: translateY(10px); }
.office-widget .oc-rise.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }
.office-widget .oc-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.office-widget .oc-draw.in { stroke-dashoffset: 0; transition: stroke-dashoffset 1s ease; }
@media (prefers-reduced-motion: reduce) {
  .office-widget .oc-rise, .office-widget .oc-rise.in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .office-widget .oc-draw, .office-widget .oc-draw.in { stroke-dashoffset: 0 !important; transition: none !important; }
}

/* interactive chart hover (crosshair + focus dot + aria-live tooltip). Every
   token resolves in BOTH themes (no dark white-halo). touch-action:pan-y keeps
   vertical page scroll while a horizontal drag scrubs the series. */
.office-widget .oc-chartwrap { position: relative; touch-action: pan-y; }
.office-widget .oc-chartwrap:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 6px; }
.office-widget .oc-chartwrap .oc-rc { position: relative; z-index: 0; }
.office-widget .oc-cw-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--oc-muted); opacity: 0; pointer-events: none; transform: translateX(-0.5px); z-index: 1; transition: opacity 0.12s ease, left 0.08s ease; }
.office-widget .oc-cw-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--oc-accent); border: 2px solid var(--oc-card); box-shadow: 0 0 0 1px var(--oc-accent); opacity: 0; pointer-events: none; transform: translate(-50%, -50%); z-index: 2; transition: opacity 0.12s ease, left 0.08s ease, top 0.08s ease; }
.office-widget .oc-cw-tip { position: absolute; top: 2px; transform: translateX(-50%); background: var(--oc-card); color: var(--oc-ink); border: 1px solid var(--oc-line); border-radius: 8px; padding: 3px 8px; font-size: 0.72rem; font-weight: 650; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.14); opacity: 0; pointer-events: none; z-index: 3; font-variant-numeric: tabular-nums; }
.office-widget .oc-cw-tip.oc-tip-l { transform: translateX(0); }
.office-widget .oc-cw-tip.oc-tip-r { transform: translateX(-100%); }
.office-widget .oc-cw-spark .oc-cw-dot { width: 7px; height: 7px; }
.office-widget .oc-cw-spark .oc-cw-tip { font-size: 0.66rem; padding: 2px 6px; }
@media (prefers-reduced-motion: reduce) {
  .office-widget .oc-cw-cross, .office-widget .oc-cw-dot { transition: none !important; }
}

/* feature chart + grain toggle */
.office-widget .oc-featurechart { margin-bottom: 4px; }
.office-widget .oc-chart-head { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.office-widget .oc-grainsegs button, .office-widget .oc-minisegs button { font-size: 0.72rem; padding: 4px 10px; min-height: 30px; }
.office-widget .oc-minisegs { display: inline-flex; background: var(--oc-card-2); border: 1px solid var(--oc-line); border-radius: 999px; padding: 3px; gap: 2px; }
.office-widget .oc-minisegs button { border: 0; background: none; color: var(--oc-ink-2); font: inherit; font-weight: 650; border-radius: 999px; cursor: pointer; }
.office-widget .oc-minisegs button[aria-checked="true"] { background: var(--oc-accent); color: #fff; }
.office-widget .oc-minisegs button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.office-widget .oc-mix-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }

/* sold / calls headline + MoM momentum chip */
.office-widget .oc-sales-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; }
.office-widget .oc-sales-head-v { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--oc-ink); }
.office-widget .oc-sales-head-k { font-size: 0.82rem; color: var(--oc-muted); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.office-widget .oc-mom { display: inline-flex; align-items: center; gap: 3px; font-size: 0.74rem; font-weight: 750; padding: 2px 8px; border-radius: 999px; }
.office-widget .oc-mom.up { color: var(--oc-pos); background: var(--oc-green-tint); }
.office-widget .oc-mom.dn { color: var(--oc-neg); background: var(--oc-warn-tint); }
.office-widget .oc-mom-basis { color: var(--oc-muted); font-weight: 600; }

/* referral callout */
.office-widget .oc-callout { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 11px; border-radius: 11px; background: var(--oc-green-tint); border: 1px solid color-mix(in srgb, var(--oc-green) 28%, transparent); font-size: 0.8rem; color: var(--oc-ink-2); }
.office-widget .oc-callout strong { color: var(--oc-green-deep); font-weight: 800; }
.office-widget .oc-callout svg { color: var(--oc-green-deep); flex: none; }

/* recognition: milestone badges + streak + team pulse + praise-to-concern */
.office-widget .oc-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.office-widget .oc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; border: 1px solid var(--oc-line); background: var(--oc-card-2); color: var(--oc-ink); }
.office-widget .oc-badge svg { flex: none; }
.office-widget .oc-badge-tenure { background: var(--oc-accent-tint); border-color: color-mix(in srgb, var(--oc-accent) 30%, transparent); }
.office-widget .oc-badge-tenure svg { color: var(--oc-accent); }
.office-widget .oc-badge-volume, .office-widget .oc-badge-streak { background: var(--oc-gold-tint); border-color: color-mix(in srgb, var(--oc-gold) 32%, transparent); }
.office-widget .oc-badge-volume svg, .office-widget .oc-badge-streak svg { color: var(--oc-gold-deep); }
.office-widget .oc-badge-d { font-weight: 600; color: var(--oc-muted); font-size: 0.72rem; }
.office-widget .oc-pulse { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.8rem; color: var(--oc-ink-2); }
.office-widget .oc-pulse svg { color: var(--oc-green-deep); flex: none; }
.office-widget .oc-p2c { margin-top: 8px; font-size: 0.76rem; color: var(--oc-muted); font-weight: 600; }
.office-widget .oc-readmore { border: 0; background: none; color: var(--oc-accent); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.office-widget .oc-readmore:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 3px; }

/* time signals (overtime + clock staleness) */
.office-widget .oc-timechips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.office-widget .oc-timechip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 650; color: var(--oc-ink-2); background: var(--oc-card-2); border: 1px solid var(--oc-line); border-radius: 999px; padding: 4px 10px; }
.office-widget .oc-timechip.oc-tc-stale { color: var(--oc-muted); }
.office-widget .oc-tc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.office-widget .oc-calls-busy { margin-top: 12px; }

/* responsive: 2-up scorecard on tablet, 1-up on phone; shrink fixed charts */
@media (max-width: 820px) {
  .office-widget .oc-score { grid-template-columns: 1fr 1fr; }
  .office-widget .oc-grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .office-widget .oc-score, .office-widget .oc-grid2, .office-widget .oc-grid3, .office-widget .oc-records, .office-widget .oc-split { grid-template-columns: 1fr; }
  .office-widget .oc-rec-card { flex-basis: 88%; }
  .office-widget .oc-hb { grid-template-columns: 64px 1fr auto; }
  .office-widget .oc-pie { max-width: 118px; }
  .office-widget .oc-radar { max-width: 200px; }
  .office-widget .oc-st .oc-v { font-size: 1.5rem; }
  .office-widget .oc-sales-head-v { font-size: 1.7rem; }
}
