/* The SAFE Standard for Femtech CSS */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --color-excellent: #10b981;
    --color-good: #f59e0b;
    --color-poor: #ef4444;
    --color-primary: #A78BFA;    /* Purple - matches website */
    --color-secondary: #6EE7B7;   /* Teal - matches website */
    --color-accent: #FB7185;      /* Coral - matches website */
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-bg-gradient: linear-gradient(to br, #faf5ff, #f0fdfa);
    --color-border: #e5e7eb;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    background: #f9fafb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    text-decoration: none;
    color: var(--color-text);
}

.nav-brand h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #7c3aed, #4f9d8e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand .tagline {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.nav-menu a.nav-logout {
    color: #ef4444;
}

.nav-menu a.nav-logout:hover {
    color: #dc2626;
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom right, #faf5ff, #f0fdfa, #fff1f2);
    color: var(--color-text);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;  /* Fully rounded like website */
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 20px 25px -5px rgba(167, 139, 250, 0.3);
    transform: translateY(-2px) scale(1.05);
}

.btn-secondary {
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-success {
    background: var(--color-excellent);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-action {
    background: white;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.btn-action:hover {
    background: var(--color-primary);
    color: white;
}

.action-select {
    padding: 0.4rem 0.6rem;
    border: 1.5px solid var(--color-primary);
    border-radius: 9999px;
    background: white;
    color: var(--color-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A78BFA' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.5rem;
}

.action-select:hover {
    background-color: #faf5ff;
    border-color: #8b5cf6;
}

.action-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3);
}

/* Sections */
section {
    margin: var(--spacing-xl) 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.lead {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

/* Dimensions Grid */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.dimension-card {
    background: var(--color-bg-alt);
    padding: var(--spacing-lg);
    border-radius: 0.75rem;
    text-align: center;
}

.dimension-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0 auto var(--spacing-sm);
}

.dimension-icon.security { background: #3b82f6; }
.dimension-icon.accuracy { background: var(--color-excellent); }
.dimension-icon.foundation { background: var(--color-primary); }
.dimension-icon.equity { background: var(--color-secondary); }

.dimension-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.product-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

.product-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.product-header .company {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.product-logo-small {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid var(--color-border);
    background: white;
}

.product-logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* Score Badges - Yuka Style Circular Badges */
.score-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    border-radius: 0.5rem;
    margin: var(--spacing-sm) 0;
}

.score-badge.score-excellent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-excellent);
}

.score-badge.score-good {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-good);
}

.score-badge.score-poor {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-poor);
}

/* Circular Badge - Yuka Style */
.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.score-circle.score-excellent {
    border-color: var(--color-excellent);
    color: var(--color-excellent);
}

.score-circle.score-good {
    border-color: var(--color-good);
    color: var(--color-good);
}

.score-circle.score-poor {
    border-color: var(--color-poor);
    color: var(--color-poor);
}

.score-circle .score-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.score-circle .score-max {
    font-size: 1.25rem;
    opacity: 0.7;
    font-weight: 600;
}

.score-circle .score-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.score-badge-large {
    padding: var(--spacing-lg);
}

.score-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.score-badge-large .score-number {
    font-size: 3.5rem;
}

.score-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.score-max {
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Dimension Scores Mini */
.dimension-scores {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.dimension-mini {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: var(--color-bg-alt);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dimension-mini .label {
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.75rem;
}

.dimension-mini .value {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}

/* Product Detail */
.product-header-full {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.product-title-section {
    display: flex;
    align-items: start;
    gap: var(--spacing-md);
}

.product-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.product-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-name {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin: 0.5rem 0;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-alt);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Dimension Dots - Compact score indicators */
.dimension-dots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.dimension-dot-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.dot-strong {
    background: var(--color-excellent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.dot-mixed {
    background: var(--color-good);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.dot-high-concern {
    background: var(--color-poor);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.dot-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    min-width: 80px;
}

.dot-score {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.score-interpretation {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    border-radius: 0.5rem;
}

.interpretation.excellent {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--color-excellent);
}

.interpretation.good {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--color-good);
}

.interpretation.poor {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--color-poor);
}

/* Dimension Detail Cards - Flo Health Style */
.dimensions-detail {
    margin-top: var(--spacing-xl);
}

.dimension-detail-card {
    background: white;
    border-radius: 1.25rem;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dimension-detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Gradient backgrounds for each dimension */
.dimension-detail-card.security {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(167, 139, 250, 0.02) 100%);
}

.dimension-detail-card.accuracy {
    background: linear-gradient(135deg, rgba(110, 231, 183, 0.08) 0%, rgba(110, 231, 183, 0.02) 100%);
}

.dimension-detail-card.foundation {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.08) 0%, rgba(251, 113, 133, 0.02) 100%);
}

.dimension-detail-card.equity {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-md);
}

.dimension-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.dimension-desc {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

/* Progress bar style score */
.dimension-score-container {
    text-align: right;
}

.dimension-score-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dimension-score-number.score-strong {
    color: var(--color-excellent);
}

.dimension-score-number.score-mixed {
    color: var(--color-good);
}

.dimension-score-number.score-high-concern {
    color: var(--color-poor);
}

.dimension-progress-bar {
    width: 150px;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    margin-left: auto;
}

.dimension-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.dimension-progress-fill.score-strong {
    background: linear-gradient(90deg, var(--color-excellent), #10b981);
}

.dimension-progress-fill.score-mixed {
    background: linear-gradient(90deg, var(--color-good), #f59e0b);
}

.dimension-progress-fill.score-high-concern {
    background: linear-gradient(90deg, var(--color-poor), #ef4444);
}

.dimension-summary {
    margin: var(--spacing-md) 0;
    color: var(--color-text);
    line-height: 1.6;
}

.dimension-section {
    margin: var(--spacing-md) 0;
}

.dimension-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Color-coded dots for strengths and concerns */
.strengths-list, .concerns-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.strengths-list li, .concerns-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.strengths-list li::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-excellent);
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.concerns-list li::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-poor);
    margin-top: 0.5rem;
    flex-shrink: 0;
}

/* CTA Button */
.product-cta {
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FB7185, #F97316);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(251, 113, 133, 0.4);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 113, 133, 0.5);
}

/* How Calculated Section */
.how-calculated {
    background: rgba(167, 139, 250, 0.05);
    border-radius: 1rem;
    padding: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.how-calculated h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.how-calculated p {
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.how-calculated ul {
    margin: var(--spacing-sm) 0;
    padding-left: 1.5rem;
}

.how-calculated li {
    line-height: 1.7;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.evaluation-date {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--color-text-light);
}

/* ==========================================
   Trading Card Scorecard
   ========================================== */

.card-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

/* Card Frame — the collectible border */
.card-frame {
    border-radius: 1.25rem;
    padding: 4px;
    background-size: 300% 300%;
}

/* Rarity: Excellent — gold holographic, fast shimmer */
.card-rarity-excellent {
    background: linear-gradient(145deg, #fbbf24, #f59e0b, #fde68a, #10b981, #a7f3d0, #fbbf24);
    background-size: 400% 400%;
    animation: cardShimmer 3s ease infinite;
    box-shadow:
        0 8px 32px rgba(245, 158, 11, 0.3),
        0 0 20px rgba(251, 191, 36, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Rarity: Good — silver shimmer, moderate speed */
.card-rarity-good {
    background: linear-gradient(145deg, #e5e7eb, #d1d5db, #f9fafb, #a78bfa, #e5e7eb, #d1d5db);
    background-size: 400% 400%;
    animation: cardShimmer 5s ease infinite;
    box-shadow:
        0 8px 32px rgba(167, 139, 250, 0.15),
        0 0 12px rgba(209, 213, 219, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Rarity: Poor — bronze/muted, slow shimmer */
.card-rarity-poor {
    background: linear-gradient(145deg, #d6d3d1, #a8a29e, #e7e5e4, #d6d3d1);
    background-size: 300% 300%;
    animation: cardShimmer 8s ease infinite;
    box-shadow:
        0 4px 16px rgba(168, 162, 158, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Rarity: Not scored */
.card-rarity-none {
    background: linear-gradient(145deg, #e5e7eb, #d1d5db, #f3f4f6, #e5e7eb);
    background-size: 300% 300%;
    animation: cardShimmer 10s ease infinite;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

@keyframes cardShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card-inner {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
}

/* Hero Section — like the player photo area */
.card-hero {
    position: relative;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    overflow: hidden;
}

.card-hero-excellent {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 30%, #6ee7b7 100%);
}
.card-hero-good {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 30%, #fbbf24 100%);
}
.card-hero-poor {
    background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 30%, #f87171 100%);
}
.card-hero-none {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 30%, #d1d5db 100%);
}

/* Holographic shine overlay — follows mouse in JS, falls back to animation */
.card-hero-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.25) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.card-frame:hover .card-hero-shine {
    opacity: 1;
}

/* Product "Photo" */
.card-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 0.875rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 3px solid white;
    position: relative;
    z-index: 1;
}

.card-avatar img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.card-avatar-placeholder {
    background: white;
}

.card-avatar-placeholder span {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-primary);
}

.card-name {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
    position: relative;
    z-index: 1;
}

.card-team {
    font-size: 0.9375rem;
    color: rgba(31, 41, 55, 0.7);
    margin: 0.125rem 0 0;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.card-class-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-text);
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 1;
}

/* Score Banner */
.card-score-banner {
    text-align: center;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.card-big-score {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

.card-score-of {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.5;
}

.card-rating-label {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.125rem;
}

.card-score-color-excellent { color: var(--color-excellent); }
.card-score-color-good { color: var(--color-good); }
.card-score-color-poor { color: var(--color-poor); }
.card-score-color-none { color: #9ca3af; }

/* SAFE Standard Badge */
.safe-standard-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 0 1.25rem 0.25rem;
    background: #ecfdf5;
    border: 2px solid var(--color-excellent);
    border-radius: 0.5rem;
}

.safe-badge-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-excellent);
    flex-shrink: 0;
}

.safe-badge-text {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #065f46;
}

/* Stats Section */
/* Card summary section */
.card-summary {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-summary-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.card-summary-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.card-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.card-summary-tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    background: #f3f4f6;
    color: #374151;
}

.card-summary-tag-medical {
    background: #eff6ff;
    color: #1d4ed8;
}

.card-summary-tag-wellness {
    background: #f0fdf4;
    color: #15803d;
}

.card-summary-disclaimer {
    font-size: 0.7rem;
    font-style: italic;
    color: #9ca3af;
    line-height: 1.4;
    margin: 0;
}

.card-stats {
    padding: 0 1.25rem;
}

.card-stats-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 0 0.375rem;
    border-bottom: 2px solid var(--color-text);
}

.card-stats-label {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.card-stats-label:first-child { flex: 1; }
.card-stats-label:nth-child(2) { width: 56px; text-align: center; }
.card-stats-label:nth-child(3) { width: 64px; text-align: right; }

/* Individual Stat Row */
.card-stat-row {
    border-bottom: 1px solid #f3f4f6;
}

.card-stat-row:last-child {
    border-bottom: none;
}

.card-stat-clickable {
    cursor: pointer;
}

.card-stat-clickable:hover {
    background: #faf5ff;
}

.card-stat-main {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.625rem;
}

.card-stat-abbr {
    font-size: 0.8125rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--color-primary);
    width: 32px;
    flex-shrink: 0;
}

.card-stat-fullname {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.card-stat-value {
    font-size: 0.9375rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--color-text);
    width: 46px;
    text-align: center;
    flex-shrink: 0;
}

.card-stat-bar-wrap {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.card-stat-bar {
    width: 100%;
    height: 5px;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.card-stat-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease;
}

.card-fill-strong { background: var(--color-excellent); }
.card-fill-mixed { background: var(--color-good); }
.card-fill-high-concern { background: var(--color-poor); }

.card-stat-rating {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 56px;
    text-align: right;
    flex-shrink: 0;
}

.card-rating-strong { color: var(--color-excellent); }
.card-rating-mixed { color: var(--color-good); }
.card-rating-high-concern { color: var(--color-poor); }

.card-stat-empty {
    color: #d1d5db !important;
}

/* Expandable Detail */
.card-stat-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.card-stat-expanded .card-stat-detail {
    max-height: 2000px;
}

.card-stat-expanded {
    background: #faf5ff;
}

.card-detail-summary {
    padding: 0.5rem 0.75rem 0.75rem;
    margin: 0 0.5rem;
    background: white;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
    border: 1px solid #f0f0f0;
}

.card-detail-section {
    padding: 0.5rem 0.75rem;
}

.card-detail-section h4 {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    margin: 0 0 0.375rem;
}

.card-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.card-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text);
}

.card-detail-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 0.375rem;
    flex-shrink: 0;
}

.card-list-strengths li::before { background: var(--color-excellent); }
.card-list-concerns li::before { background: var(--color-poor); }
.card-detail-missing li::before { background: #d1d5db; }

/* Cap Notice */
.card-cap-notice {
    margin: 0.5rem 1.25rem;
    padding: 0.625rem 0.875rem;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: #92400e;
}

/* Card Footer — like the card brand/year strip */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.card-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.card-tag {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    background: rgba(167, 139, 250, 0.1);
    color: var(--color-primary);
    border-radius: 4px;
}

.card-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.card-eval-date {
    font-size: 0.625rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.card-brand {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-primary);
}

/* Below-card elements */
.card-cta {
    text-align: center;
    margin: 1.5rem 0;
}

.card-btn-visit {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.card-btn-visit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.card-methodology {
    background: #f9fafb;
    border-radius: 0.875rem;
    padding: 1.25rem;
    margin: 0.5rem 0 2rem;
}

.card-methodology h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.card-methodology p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0 0 0.375rem;
}

.card-legend {
    display: flex;
    gap: 1rem;
    margin: 0.625rem 0;
    flex-wrap: wrap;
}

.card-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--color-text);
}

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

.card-method-fine {
    color: var(--color-text-light) !important;
    font-size: 0.75rem !important;
}

/* ==========================================
   End Scorecard
   ========================================== */

/* Admin Styles */
.admin-container {
    padding: var(--spacing-lg) var(--spacing-md);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.stats-grid {
    display: flex;
    gap: 0.75rem;
    margin-bottom: var(--spacing-lg);
    justify-content: center;
}

.stats-grid .stat-card {
    flex: 0 1 180px;
}

.stat-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-align: center;
    border-top: 3px solid var(--color-primary);
}

.stat-card:nth-child(2) {
    border-top-color: var(--color-excellent);
}

.stat-card:nth-child(3) {
    border-top-color: var(--color-secondary);
}

.stat-card:nth-child(4) {
    border-top-color: var(--color-accent);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.stat-card:nth-child(2) .stat-number {
    color: var(--color-excellent);
}

.stat-card:nth-child(3) .stat-number {
    color: var(--color-secondary);
}

.stat-card:nth-child(4) .stat-number {
    color: var(--color-accent);
}

.stat-label {
    color: #374151;
    font-size: 0.8125rem;
}

.dashboard-intro {
    font-size: 1.25rem;
    color: var(--color-text);
    margin: 0;
}

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

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

.section-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 5;
}

/* Textareas expand on focus to show full content */
textarea.form-control {
    min-height: 4.5rem;
    resize: vertical;
}

textarea.form-control:focus {
    min-height: 10rem;
}

.form-section {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Logo Upload */
.logo-upload-area {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.5rem;
}

.logo-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px dashed var(--color-border);
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.logo-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--color-text-light);
}

.logo-preview-placeholder span {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo-upload-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.logo-upload-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.logo-or {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo-url-input {
    flex: 1;
    min-width: 180px;
    font-size: 0.8125rem !important;
    padding: 0.375rem 0.625rem !important;
}

/* Step Navigation */
.step-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--spacing-lg);
    padding: 1rem 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: all 0.2s;
}

.step-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8125rem;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    color: var(--color-text-light);
}

.step-active {
    color: var(--color-text);
    font-weight: 600;
}

.step-active .step-number {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.step-completed .step-number {
    background: var(--color-excellent);
    border-color: var(--color-excellent);
    color: white;
}

.step-clickable:hover {
    color: var(--color-primary);
}

.step-clickable:hover .step-number {
    border-color: var(--color-primary);
}

.step-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.step-divider {
    width: 40px;
    height: 2px;
    background: var(--color-border);
    margin: 0 0.25rem;
}

/* AI Suggestion Box */
.ai-suggestion-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.06), rgba(110, 231, 183, 0.06));
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ai-suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ai-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.625rem;
    background: rgba(167, 139, 250, 0.15);
    color: #7c3aed;
    border-radius: 9999px;
}

.ai-suggested-score {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
}

.ai-suggestion-content {
    margin-bottom: 1rem;
}

.ai-reasoning {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.ai-detail-row {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-text-light);
    margin-bottom: 0.375rem;
}

.ai-detail-row:empty {
    display: none;
}

.ai-suggestion-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-accept {
    background: var(--color-excellent);
    color: white;
    border: none;
}

.btn-accept:hover {
    background: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-decline {
    background: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
}

.btn-decline:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border-color: var(--color-text-light);
}

/* AI Decision Badges (shown in dimension header) */
.ai-decision-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ai-badge-accepted {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.ai-badge-declined {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-light);
}

/* Dimension header right side */
.dimension-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dimension section headers on sources form */
.dimension-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dimension-section-header h2 {
    margin-bottom: 0;
}

.dimension-section-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.security-tag { background: #3b82f6; }
.accuracy-tag { background: var(--color-excellent); }
.foundation-tag { background: var(--color-primary); }
.equity-tag { background: var(--color-secondary); color: var(--color-text); }

.dimension-section-security { border-left: 3px solid #3b82f6; }
.dimension-section-accuracy { border-left: 3px solid var(--color-excellent); }
.dimension-section-foundation { border-left: 3px solid var(--color-primary); }
.dimension-section-equity { border-left: 3px solid var(--color-secondary); }

/* Evidence fields header (What to Look For) */
.evidence-fields-header {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.evidence-fields-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.evidence-fields-header p {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin: 0;
}

.evidence-field textarea {
    font-size: 0.875rem;
    min-height: 3.5rem;
    transition: all 0.25s ease;
}

.evidence-field textarea:focus {
    min-height: 10rem;
}

/* Research status */
.research-status {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}
.research-loading {
    color: var(--color-primary);
    background: rgba(167, 139, 250, 0.1);
}
.research-success {
    color: var(--color-excellent);
    background: rgba(16, 185, 129, 0.1);
}
.research-error {
    color: var(--color-poor);
    background: rgba(239, 68, 68, 0.1);
}

/* Small button variant */
.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

/* Accordion sections */
.accordion-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin: -0.5rem;
    margin-bottom: 0;
}
.accordion-header:hover {
    background-color: var(--color-bg-alt);
}
.accordion-chevron {
    transition: transform 0.25s ease;
    color: var(--color-text-light);
    flex-shrink: 0;
}
.accordion-chevron.open {
    transform: rotate(180deg);
}
.accordion-body {
    padding-top: 1rem;
}

/* Completion indicator */
.completion-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-light);
}
.completion-partial {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}
.completion-complete {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* General Links 3-column grid */
.general-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

/* URL fields 2-column grid */
.url-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--spacing-md);
}

/* Evidence fields area with subtle background */
.evidence-fields-area {
    background: var(--color-bg-alt);
    border-radius: 0.5rem;
    padding: 1rem var(--spacing-md);
    margin-top: 0.5rem;
}

/* Search link items (Find Links feature) */
.search-link-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.search-link-item:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* AI-filled field styling */
.ai-filled {
    color: #3b82f6 !important;
}
.ai-field-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

textarea.ai-filled {
    border-left: 3px solid #3b82f6;
    background: rgba(59, 130, 246, 0.03);
}

@media (max-width: 768px) {
    .general-links-grid,
    .url-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* AI assist section */
.ai-assist-section {
    margin-bottom: 1rem;
}

.ai-loading {
    margin-top: 0.5rem;
    color: var(--color-primary);
    font-size: 0.875rem;
}

/* Quick Add from URL */
.quick-add-section {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(110, 231, 183, 0.08));
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 0.75rem;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}
.quick-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.15);
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}
.quick-add-section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}
.quick-add-desc {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}
.quick-add-input-row {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}
.quick-add-input-row .form-control {
    flex: 1;
}
.quick-add-input-row .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.detect-status {
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
}
.detect-status:empty {
    display: none;
}
.detect-loading {
    color: var(--color-primary);
    background: rgba(167, 139, 250, 0.1);
}
.detect-success {
    color: var(--color-excellent);
    background: rgba(16, 185, 129, 0.1);
}
.detect-error {
    color: var(--color-poor);
    background: rgba(239, 68, 68, 0.1);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
#detect-spinner {
    animation: spin 1.5s linear infinite;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* Category checkboxes */
.category-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.category-group {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.category-group-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400 !important;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Category tags display */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.category-tag {
    display: inline-block;
    background: rgba(167, 139, 250, 0.1);
    color: #7c3aed;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* Classification badges */
.classification-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 0.375rem;
}

.classification-medical {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.classification-wellness {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Product type tags */
.category-tag.type-tag {
    background: rgba(251, 113, 133, 0.1);
    color: #e11d48;
}

/* Scoring form - classification info bar */
.classification-info-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(167, 139, 250, 0.05);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.weight-info {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Weighted total preview (sticky) */
.weighted-total-preview {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-scores {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.preview-item {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
}

.preview-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.preview-max {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.band-preview-excellent { color: var(--color-excellent); }
.band-preview-good { color: var(--color-good); }
.band-preview-poor { color: var(--color-poor); }

.cap-warning {
    margin-top: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Sub-criteria grid */
.sub-criteria-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sub-criterion-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-alt);
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
}

.sc-label {
    flex: 1;
    min-width: 0;
}

.sc-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.sc-range {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.sc-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.sc-score-input {
    width: 4.5rem !important;
    text-align: center;
    padding: 0.375rem !important;
}

.sc-status-select {
    width: 7rem !important;
    padding: 0.375rem 0.25rem !important;
    font-size: 0.8125rem !important;
}

/* Dimension total bar */
.dimension-total-bar {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.dt-label {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.dt-value {
    font-size: 1.25rem;
    font-weight: 800;
}

.dt-max {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.dt-band {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.band-strong { background: rgba(16, 185, 129, 0.1); color: #059669; }
.band-mixed { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.band-concern { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

/* Dimension form header with weight badge */
.dimension-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dimension-form-header h2 {
    margin-bottom: 0;
}

.weight-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    background: rgba(167, 139, 250, 0.1);
    color: #7c3aed;
    border-radius: 9999px;
}

/* Public scorecard - threshold cap notice */
.cap-notice {
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.75rem;
    color: #92400e;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* Public scorecard - missing info section */
.missing-info-section {
    background: rgba(107, 114, 128, 0.05);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}

.missing-info-section h4 {
    color: var(--color-text-light);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.missing-info-list {
    margin: 0.375rem 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.missing-info-list li {
    margin-bottom: 0.25rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: white;
    font-size: 0.875rem;
    color: var(--color-text);
    cursor: pointer;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2);
}

/* Tables */
.admin-table {
    width: 100%;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
}

.admin-table th {
    background: linear-gradient(135deg, #faf5ff, #f0fdfa);
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary);
}

.admin-table tr {
    border-bottom: 1px solid var(--color-border);
}

.admin-table tr:last-child {
    border-bottom: none;
}

/* Classification row colors */
.admin-table tbody tr.row-medical {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.admin-table tbody tr.row-wellness {
    background-color: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.admin-table tbody tr.row-medical:hover {
    background-color: #dbeafe;
}

.admin-table tbody tr.row-wellness:hover {
    background-color: #dcfce7;
}

/* Merged product/company cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-cell-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-cell-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.product-cell-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.product-cell-company {
    font-size: 0.8rem;
    color: #6b7280;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.published {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-excellent);
}

.status-badge.draft {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-light);
}

.score-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.score-pill.score-none {
    background: var(--color-bg-alt);
    color: var(--color-text-light);
}

.score-pill.score-excellent {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-excellent);
}

.score-pill.score-good {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-good);
}

.score-pill.score-poor {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-poor);
}

/* Actions list in dashboard table */
.actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.action-link {
    display: block;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.action-link:hover {
    opacity: 0.7;
}

.action-edit { color: var(--color-primary); }
.action-report { color: var(--color-excellent); }
.action-unpublish { color: var(--color-good); }
.action-delete { color: var(--color-poor); }

/* Product name links in table */
.product-name-link {
    color: var(--color-primary);
    text-decoration: none;
}

.product-name-link:hover {
    text-decoration: underline;
}

.product-name-link-edit {
    color: var(--color-text);
    text-decoration: none;
}

.product-name-link-edit:hover {
    color: var(--color-primary);
}

/* Product cell with inline logo */
.product-cell-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-logo-inline {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: white;
    flex-shrink: 0;
}

.product-logo-inline img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

/* Smaller secondary text under table cells */
.table-subtext {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.125rem;
}

/* Footer */
footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3, .footer-section h4 {
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--color-text-light);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.breadcrumb {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: var(--spacing-md);
    z-index: 1000;
    max-width: 400px;
}

.alert {
    padding: var(--spacing-md);
    border-radius: 0.5rem;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.alert-error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .product-header-full {
        flex-direction: column;
    }

    .nav-menu {
        gap: var(--spacing-sm);
    }

    .dimension-header {
        flex-direction: column;
    }
}
