@layer components {
  /* Client Specific Layouts */
  .client-container {
    max-width: 1000px;
    /* Already has negative margin via .app-container */
  }

  /* Bento Grid */
  .bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
  }

  .bento-box {
    background: var(--color-surface-translucent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Staggered entry animation */
    animation: slide-up 0.8s var(--ease-spring) backwards;
  }
  
  .bento-header {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface); /* Make header pop as solid */
    backdrop-filter: none;
  }
  
  .bento-header h1 {
    font-family: var(--gra-font-family-heading);
    font-weight: 800;
    color: var(--color-heading);
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 2rem;
  }
  .bento-header p {
    color: var(--color-text-light) !important;
  }

  .bento-wide { grid-column: 1 / -1; }

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

  .btn-outline {
    background: transparent !important;
    border: 1px solid var(--color-border) !important;
    color: var(--color-text) !important;
  }
  .btn-outline:hover {
    background: var(--color-border) !important;
  }

  /* Visualizations: Progress Bars */
  .perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  }

  .perf-metric {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .perf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .perf-header .metric-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--color-text-light);
  }

  .progress-track {
    width: 100%;
    height: 12px;
    background: var(--color-bg);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--color-border);
  }

  .progress-fill {
    height: 100%;
    width: 0%; /* Set via JS */
    border-radius: 999px;
    transition: width 1.2s var(--ease-spring), background-color 0.5s;
    background-color: var(--color-accent);
  }

  /* Visualizations: Security Shields */
  .sec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .sec-metric {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-bg);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
  }

  .sec-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--color-surface);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  .sec-icon::before {
    content: "🛡️";
    font-size: 28px;
  }

  .sec-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .sec-details .metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
  }
  .sec-details .metric-value {
    text-align: left;
    font-weight: 600;
  }

  /* Tooltips & Native Popovers */
  .info-btn {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }
  .info-btn:hover {
    background: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
    transform: scale(1.1);
  }

  .native-popover {
    padding: 0.75rem 1rem;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    margin: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Popover Top-Layer Animation (Josh Comeau style entry) */
    transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete, opacity 0.3s, transform 0.3s var(--ease-spring);
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  .native-popover:popover-open {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  @starting-style {
    .native-popover:popover-open {
      opacity: 0;
      transform: translateY(10px) scale(0.95);
    }
  }
}
