/* ==========================================
   BENEFIQ — SHARED COMPONENTS
   Reusable UI patterns: buttons, inputs, cards,
   badges, modals, toasts, progress, etc.
   ========================================== */

@layer components {

  /* --- BUTTONS --- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    line-height: 1;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
    user-select: none;
  }

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

  /* Brand Button — coral gradient, pill shape, press physics */
  .btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: var(--gradient-brand);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.5rem;
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-base);
    transform: scale(1);
    white-space: nowrap;
    user-select: none;
  }

  .btn-brand:hover:not(:disabled) {
    background: var(--gradient-brand-hover);
    box-shadow: 0 4px 12px rgba(235, 68, 37, 0.3);
  }

  .btn-brand:active:not(:disabled) {
    transform: scale(0.97);
  }

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

  .btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(235, 68, 37, 0.2);
  }

  .btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(235, 68, 37, 0.3);
  }

  .btn-primary:active:not(:disabled) {
    transform: scale(0.97);
  }

  .btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--surface-200);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-5);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
  }

  .btn-secondary:hover:not(:disabled) {
    background: var(--color-bg-sunken);
    border-color: var(--surface-300);
  }

  .btn-secondary:active:not(:disabled) {
    transform: scale(0.97);
  }

  .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--surface-300);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
  }

  .btn-outline:hover:not(:disabled) {
    color: var(--color-text);
    border-color: var(--surface-400);
    background: var(--color-bg-sunken);
  }

  .btn-outline:active:not(:disabled) {
    transform: scale(0.97);
  }

  .btn-ghost {
    background: transparent;
    color: var(--color-accent);
    border: none;
    padding: var(--space-3) var(--space-5);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
  }

  .btn-ghost:hover:not(:disabled) {
    background: var(--color-accent-subtle);
    color: var(--color-accent-hover);
  }

  .btn-ghost:active:not(:disabled) {
    transform: scale(0.97);
  }

  .btn-danger {
    background: var(--danger);
    color: var(--text-inverse);
  }

  .btn-danger:hover:not(:disabled) {
    background: #dc2626;
  }

  .btn-danger:active:not(:disabled) {
    transform: scale(0.97);
  }

  .btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
  }

  .btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
  }

  .btn-icon.sm {
    width: 32px;
    height: 32px;
  }

  /* --- INPUTS --- */
  .input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }

  .input-label {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text);
  }

  .input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-bg-elevated);
    border: 1px solid var(--surface-200);
    border-radius: var(--radius-input);
    transition: border-color var(--transition-base);
  }

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

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

  .input-lg {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
  }

  /* Search Input */
  .search-input-wrapper {
    position: relative;
  }

  .search-input-wrapper .search-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
  }

  .search-input-wrapper .input {
    padding-left: 44px;
  }

  /* --- CARDS --- */
  .card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
  }

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

  .card-body {
    padding: var(--space-5);
  }

  .card-header {
    padding: var(--space-5);
    border-bottom: 1px solid var(--border);
  }

  .card-footer {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-sunken);
    border-top: 1px solid var(--border);
  }

  /* Interactive Card */
  .card-interactive {
    cursor: pointer;
  }

  .card-interactive:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .card-interactive:active {
    transform: translateY(0);
  }

  /* --- CREDIT CARD VISUALS --- */
  .credit-card-visual {
    aspect-ratio: 1.586;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .credit-card-visual.sm {
    width: 60px;
    border-radius: var(--radius-sm);
  }

  .credit-card-visual.md {
    width: 80px;
  }

  .credit-card-visual.lg {
    width: 120px;
  }

  .credit-card-visual::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 15%;
    height: 20%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 2px;
  }

  /* --- BADGES & CHIPS --- */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-sm);
    background: var(--bg-sunken);
    color: var(--text-secondary);
  }

  .badge-primary {
    background: var(--primary-light);
    color: var(--primary);
  }

  .badge-success {
    background: var(--success-light);
    color: var(--success);
  }

  .badge-warning {
    background: var(--warning-light);
    color: var(--warning);
  }

  .badge-danger {
    background: var(--danger-light);
    color: var(--danger);
  }

  .chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
    background: #FFFFFF;
    border: 1px solid var(--surface-200);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
  }

  .chip:hover {
    border-color: var(--surface-400);
    background: #FFFFFF;
  }

  .chip.active {
    background: var(--surface-900);
    color: #FFFFFF;
    border-color: var(--surface-900);
  }

  /* --- PROGRESS --- */
  .progress-bar {
    height: 6px;
    background: var(--bg-sunken);
    border-radius: var(--radius-full);
    overflow: hidden;
  }

  .progress-bar-fill {
    height: 100%;
    background: var(--success);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
  }

  .progress-ring {
    position: relative;
    display: inline-flex;
  }

  .progress-ring svg {
    transform: rotate(-90deg);
  }

  .progress-ring circle {
    fill: none;
    stroke-width: 3;
  }

  .progress-ring .bg {
    stroke: var(--bg-sunken);
  }

  .progress-ring .fill {
    stroke: var(--success);
    stroke-linecap: round;
    transition: stroke-dashoffset var(--transition-slow);
  }

  .progress-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: var(--weight-bold);
  }

  /* --- WIDGET GRID SYSTEM --- */
  .widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
  }

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

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

  @media (max-width: 480px) {
    .widget-grid,
    .widget-grid-2,
    .widget-grid-3,
    .widget-grid-4 {
      grid-template-columns: 1fr;
    }
  }

  /* --- STAT WIDGET CARD --- */
  .stat-widget {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-widget);
    padding: var(--space-5);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  .stat-widget-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
  }

  .stat-widget-value {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: var(--text-3xl);
    color: var(--color-text);
    line-height: 1;
  }

  .stat-widget-value--success { color: var(--color-success); }
  .stat-widget-value--warning { color: var(--brand-500); }
  .stat-widget-value--purple { color: var(--purple-500); }
  .stat-widget-value--blue { color: var(--accent-blue-500); }

  .stat-widget-change {
    font-size: var(--text-xs);
    margin-top: var(--space-2);
  }

  .stat-widget-change--up { color: var(--color-success); }
  .stat-widget-change--down { color: var(--color-danger); }

  /* --- DASHBOARD PAGE HEADER --- */
  .dashboard-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: var(--space-4);
  }

  .dashboard-header-actions {
    display: flex;
    gap: var(--space-3);
  }

  /* --- STATUS BADGE SYSTEM --- */
  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-pill);
  }

  .status-badge-coral { background: var(--brand-100); color: var(--brand-600); }
  .status-badge-purple { background: var(--purple-100); color: var(--purple-600); }
  .status-badge-green { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
  .status-badge-blue { background: var(--accent-blue-100); color: var(--accent-blue-600); }
  .status-badge-red { background: rgba(239, 68, 68, 0.1); color: var(--color-danger); }

  /* --- DATA TABLE --- */
  .data-table {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
  }

  .data-table-header {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-5);
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }

  .data-table-row {
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-base);
  }

  .data-table-row:last-child { border-bottom: none; }
  .data-table-row:hover { background: var(--surface-50); }

  .data-table-cell { flex: 1; }

  /* --- DASHBOARD PROGRESS BAR (enhanced) --- */
  .progress-bar--dashboard {
    height: 8px;
    background: var(--surface-100);
    border-radius: var(--radius-pill);
    overflow: hidden;
  }

  .progress-bar--dashboard .progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.6s ease;
  }

  .progress-bar-fill--coral { background: var(--brand-500); }
  .progress-bar-fill--purple { background: var(--purple-500); }
  .progress-bar-fill--green { background: var(--color-success); }
  .progress-bar-fill--blue { background: var(--accent-blue-500); }

  /* --- MODALS --- */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    transition: opacity var(--transition-base);
  }

  .modal-backdrop.active {
    opacity: 1;
  }

  .modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: calc(100% - var(--space-8));
    max-width: 480px;
    max-height: calc(100vh - var(--space-16));
    background: var(--bg-elevated);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-modal);
    opacity: 0;
    transition: all var(--transition-spring);
    overflow: hidden;
  }

  .modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

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

  .modal-header h3 {
    font-size: var(--text-lg);
  }

  .modal-body {
    padding: var(--space-5);
    overflow-y: auto;
  }

  .modal-footer {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-sunken);
    border-top: 1px solid var(--border);
  }

  /* --- CONFIRM DIALOG --- */
  .confirm-dialog {
    max-width: 360px;
  }

  .confirm-body {
    padding: var(--space-6);
  }

  .confirm-message {
    font-size: var(--text-base);
    margin-bottom: var(--space-5);
    text-align: center;
  }

  .confirm-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
  }

  .confirm-cancel {
    background: var(--bg-sunken);
    color: var(--color-text);
    border: 1px solid var(--border);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
  }

  .confirm-cancel:hover {
    background: var(--surface-200);
  }

  .confirm-destructive {
    background: var(--error, #dc2626);
    color: var(--text-inverse);
    border: none;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
  }

  .confirm-destructive:hover {
    opacity: 0.9;
  }

  /* --- TOASTS --- */
  .toast-container {
    position: fixed;
    top: calc(var(--top-bar-height, 56px) + var(--space-4));
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
  }

  .toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--text);
    color: var(--text-inverse);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    pointer-events: auto;
    animation: toast-in 0.3s var(--transition-spring);
  }

  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(-16px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .toast.leaving {
    animation: toast-out 0.2s ease forwards;
  }

  .toast-success {
    background: #22c55e;
  }

  .toast-error {
    background: #ef4444;
  }

  @keyframes toast-out {
    to {
      opacity: 0;
      transform: translateY(-12px) scale(0.95);
    }
  }

  /* --- SKELETON LOADING --- */
  .skeleton {
    background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--bg) 50%, var(--bg-sunken) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
  }

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

  /* --- EMPTY STATES --- */
  .empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
  }

  .empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
  }

  .empty-state h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
  }

  .empty-state p {
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto var(--space-5);
  }

  /* --- DIVIDERS --- */
  .divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-5) 0;
  }

  .divider-text {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--text-muted);
    font-size: var(--text-sm);
  }

  .divider-text::before,
  .divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  /* --- STAT DISPLAY — Display font for big numbers --- */
  .stat-value {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    color: var(--color-text);
  }

  /* --- ANIMATIONS --- */
  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes slide-up {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes scale-in {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  .animate-fade-in {
    animation: fade-in var(--transition-base) ease;
  }

  .animate-slide-up {
    animation: slide-up var(--transition-slow) ease;
  }

  .animate-scale-in {
    animation: scale-in var(--transition-spring);
  }

  /* Staggered children */
  .stagger-children > * {
    opacity: 0;
    animation: slide-up 0.4s ease forwards;
  }

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

  /* Touch target compliance (44px minimum) */
  @media (pointer: coarse) {
    .btn-sm {
      min-height: 44px;
    }
    .btn-icon.sm {
      width: 44px;
      height: 44px;
    }
    .confirm-cancel,
    .confirm-destructive {
      min-height: 44px;
    }
  }

}

/* ==========================================
   SKELETON LOADERS
   ========================================== */
  .skeleton {
    background: linear-gradient(
      90deg,
      var(--surface-100) 25%,
      var(--surface-50) 50%,
      var(--surface-100) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
  }

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

  .skeleton-card {
    height: 180px;
    border-radius: var(--radius-card);
    margin-bottom: var(--space-4);
  }

  .skeleton-text {
    height: 14px;
    margin-bottom: var(--space-2);
  }

  .skeleton-text.short { width: 40%; }
  .skeleton-text.medium { width: 65%; }
  .skeleton-text.long { width: 90%; }

  .skeleton-row {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
  }

  .skeleton-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .skeleton-content {
    flex: 1;
  }

  .skeleton-stat {
    width: 100px;
    height: 48px;
    border-radius: var(--radius-lg);
  }

  /* ==========================================
     EXTENSION ONBOARDING MODAL
     ========================================== */
  .extension-onboarding-modal {
    max-width: 400px;
    border-radius: var(--radius-card);
    overflow: visible;
  }

  .extension-onboarding-content {
    padding: var(--space-6);
    text-align: center;
    position: relative;
  }

  .extension-onboarding-content .modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
  }

  .extension-onboarding-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--brand-100) 0%, var(--brand-50) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    color: var(--brand-500);
  }

  .extension-onboarding-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-2);
    color: var(--text);
  }

  .extension-onboarding-desc {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-5);
    line-height: 1.5;
  }

  .extension-onboarding-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    text-align: left;
  }

  .extension-feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text);
  }

  .extension-feature-icon {
    font-size: 18px;
  }

  .extension-onboarding-cta {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .extension-onboarding-cta svg {
    flex-shrink: 0;
    display: block;
    position: relative;
    top: -1px;
  }

  .extension-onboarding-skip {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-sm);
    cursor: pointer;
    padding: var(--space-2);
  }

  .extension-onboarding-skip:hover {
    color: var(--text);
  }

  .extension-onboarding-dismiss-wrap {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
  }

  .extension-onboarding-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-xs);
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
  }

  .extension-onboarding-dismiss:hover {
    opacity: 1;
    text-decoration: underline;
  }

}

/* ==========================================
   VIEW TRANSITIONS
   Browser-level pseudo-elements (outside @layer)
   ========================================== */
@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

::view-transition-old(root) {
  animation: fade-out 0.15s ease;
}

::view-transition-new(root) {
  animation: fade-in 0.2s ease;
}
