/* Dashboard - Modern Card-Based Layout for Community Platform */

/* ========================================
   Dashboard Container & Layout
   ======================================== */
.dashboard-redesign {
    min-height: 100vh;
    background: var(--color-bg-secondary);
    padding-bottom: 4rem;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   Welcome Section
   ======================================== */
.welcome-header {
    text-align: center;
    padding: 2rem 0;
    animation: fadeInDown 0.6s ease-out;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.welcome-title .user-name {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: inherit;
}

.welcome-tagline {
    font-size: 1.375rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin: 0.5rem 0 1.5rem 0;
    font-weight: 400;
}

/* Quick Stats Bar */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.quick-stat-icon {
    font-size: 1.25rem;
    opacity: 0.8;
}

.quick-stat-value {
    font-weight: 600;
    color: var(--color-text-primary);
}

/* ========================================
   Feature Hub Cards - 4 Category Hubs
   ======================================== */
.feature-hubs-section {
    margin-bottom: 3rem;
}

.feature-hubs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Responsive: 2 columns on medium screens */
@media (max-width: 1100px) {
    .feature-hubs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 column on small screens */
@media (max-width: 600px) {
    .feature-hubs-grid {
        grid-template-columns: 1fr;
    }
}

/* Feature Hub Card */
.feature-hub {
    background: var(--color-bg-primary);
    border-radius: 16px;
    border: 1px solid var(--color-border-default);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-hub:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--color-border-hover, var(--color-border-default));
}

/* Hub Header */
.feature-hub-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border-subtle);
}

.feature-hub-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.feature-hub-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

/* Hub Links List */
.feature-hub-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feature-hub-links li {
    border-bottom: 1px solid var(--color-border-subtle);
}

.feature-hub-links li:last-child {
    border-bottom: none;
}

.feature-hub-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all 0.2s ease;
}

.feature-hub-links a:hover {
    background: var(--color-bg-secondary);
}

.feature-hub-links .link-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.feature-hub-links .link-label {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
}

.feature-hub-links .link-badge {
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    animation: badgePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.feature-hub-links .link-arrow {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.feature-hub-links a:hover .link-arrow {
    transform: translateX(4px);
    color: var(--color-primary-600);
}

/* Hidden link for customize-view toggling */
.feature-hub-links li.link-hidden {
    display: none;
}

/* Hidden hub for customize-view toggling */
.feature-hub.hub-hidden {
    display: none;
}

/* Coming Soon Items */
.feature-hub-links li.coming-soon {
    opacity: 0.7;
}

.feature-hub-links li.coming-soon .link-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--color-text-secondary);
}

.feature-hub-links .coming-soon-badge {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
}

/* Hub Color Accents */
.feature-hub[data-group="content"] .feature-hub-header {
    border-top: 3px solid #9333ea;
}

.feature-hub[data-group="connect"] .feature-hub-header {
    border-top: 3px solid #3b82f6;
}

.feature-hub[data-group="coordinate"] .feature-hub-header {
    border-top: 3px solid #14b8a6;
}

.feature-hub[data-group="resources"] .feature-hub-header {
    border-top: 3px solid #f59e0b;
}

/* ========================================
   Feature Cards - Grouped Layout (Legacy)
   ======================================== */
.feature-cards-section {
    margin-bottom: 3rem;
}

/* Feature Group Container */
.feature-group {
    margin-bottom: 2rem;
}

.feature-group:last-child {
    margin-bottom: 0;
}

/* Feature Group Header */
.feature-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.feature-group-icon {
    font-size: 1.25rem;
}

.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 0;
}

/* Responsive: 2 columns on medium screens */
@media (max-width: 900px) {
    .feature-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: 1 column on small screens */
@media (max-width: 600px) {
    .feature-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Feature Card */
.feature-card {
    background: var(--color-bg-primary);
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-border-default);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

/* Feature Card Badge (new content count) */
.feature-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ef4444;
    color: white;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    animation: badgePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

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

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-gradient, var(--color-accent-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Feature Card Icon */
.feature-card-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-card-icon {
    transform: scale(1.1);
}

/* Feature Card Content */
.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem 0;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.4;
    flex: 1;
}

.feature-card a[href] {
    color: var(--color-primary-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.feature-card:hover a[href] {
    color: var(--color-primary-700);
}

/* Feature Card Gradients - Community Brand */
.feature-card[data-category="stories"] {
    --card-gradient: linear-gradient(135deg, #9333ea, #7c3aed);
}
.feature-card[data-category="gallery"] {
    --card-gradient: linear-gradient(135deg, #a855f7, #9333ea);
}
.feature-card[data-category="profiles"] {
    --card-gradient: linear-gradient(135deg, #14b8a6, #0d9488);
}
.feature-card[data-category="chat"] {
    --card-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
}
.feature-card[data-category="docs"] {
    --card-gradient: linear-gradient(135deg, #06b6d4, #0891b2);
}
.feature-card[data-category="calling"] {
    --card-gradient: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Coming Soon Feature Card */
.feature-card.feature-card-coming-soon {
    position: relative;
    overflow: hidden;
    cursor: default;
    opacity: 0.85;
}

.feature-card.feature-card-coming-soon:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-card-badge-ribbon {
    position: absolute;
    top: 12px;
    right: -35px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 40px;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.feature-card-info {
    font-size: 0.85rem;
    color: var(--color-primary, #4f46e5);
    font-weight: 500;
    display: block;
    margin-top: 0.5rem;
}

/* ========================================
   Admin Section
   ======================================== */
.admin-section {
    margin: 3rem 0;
    animation: fadeInUp 0.6s ease-out;
}

.admin-section .section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-section .section-icon {
    font-size: 1.5rem;
}

.admin-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.admin-card {
    background: var(--color-bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: var(--color-bg-secondary);
}

.admin-card-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border-radius: 10px;
    flex-shrink: 0;
}

.admin-card-content {
    flex: 1;
}

.admin-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem 0;
}

.admin-card-description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   Awareness Widgets - Contextual Intelligence Layer
   ======================================== */
.awareness-widgets {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.awareness-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .awareness-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

.awareness-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
    /* Prevent CLS - reserve space for card content */
    min-height: 120px;
    contain: layout style;
}

.awareness-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--color-border-hover, var(--color-border));
}

.awareness-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.awareness-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.awareness-badge {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary, #14b8a6);
    animation: fadeIn 0.3s ease-out;
}

/* Smooth animation for count updates */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

.awareness-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.awareness-status {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
}

/* Scan Photos and Documents camera indicator */
#scanPhotosWidgetIndicator,
#scanDocumentsWidgetIndicator {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ========================================
   Activity Preview
   ======================================== */
.activity-preview {
    background: var(--color-bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.activity-preview-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.activity-preview-link {
    color: var(--color-primary-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.activity-preview-link:hover {
    text-decoration: underline;
}

.activity-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.activity-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    line-height: 1.4;
}

.activity-text strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

/* Activity Empty State */
.activity-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.5rem 0;
    max-width: 320px;
    line-height: 1.5;
}

/* ========================================
   Floating Action Button
   ======================================== */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: none; /* Hidden - replaced by awareness widgets */
}

.fab {
    width: 60px;
    height: 60px;
    background: var(--color-accent-500);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: var(--color-accent-600);
}

.fab:active {
    transform: scale(0.95);
}

.fab-tooltip {
    position: absolute;
    right: calc(100% + 1rem);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.feature-cards-grid {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.quick-actions {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.activity-preview {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

/* ========================================
   Responsive Mobile
   ======================================== */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 0 0.75rem;
    }

    .welcome-header {
        padding: 1rem 0 1.5rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .quick-stats {
        gap: 1rem;
    }

    .feature-cards-grid {
        gap: 1rem;
    }

    .feature-group-header {
        font-size: 1rem;
    }

    .feature-card {
        padding: 1.25rem;
        min-height: 140px;
    }

    .feature-card-icon {
        font-size: 2rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.85rem;
    }

    .quick-actions {
        padding: 1.5rem 1rem;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }

    .fab {
        width: 56px;
        height: 56px;
    }

    .fab-tooltip {
        display: none;
    }

    .onboarding-card {
        padding: 1.5rem;
    }

    .onboarding-header h3 {
        font-size: 1.5rem;
    }

    .onboarding-actions {
        flex-direction: column;
    }

    .onboarding-actions .btn {
        width: 100%;
        min-width: auto;
    }

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

/* ========================================
   Analytics Dashboard
   ======================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

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

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border-default);
    border-top-color: var(--color-primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--color-bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border-subtle);
    transition: all 0.3s ease;
}

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

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

.metric-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-icon {
    font-size: 1.5rem;
    opacity: 0.6;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.metric-trend {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.metric-trend.trend-up {
    color: #22c55e;
}

.metric-trend.trend-down {
    color: #ef4444;
}

.metric-trend.trend-neutral {
    color: var(--color-text-secondary);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--color-bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border-subtle);
}

.chart-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 1.5rem 0;
}

.chart-card canvas {
    max-height: 300px;
}

/* Data Section */
.data-section {
    margin-bottom: 2rem;
}

.data-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 1rem 0;
}

.data-table {
    background: var(--color-bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border-subtle);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--color-bg-secondary);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-border-default);
}

.data-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-subtle);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--color-bg-secondary);
}

/* Responsive for Analytics */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .select {
        flex: 1;
    }

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

    .charts-section {
        grid-template-columns: 1fr;
    }

    .data-table {
        overflow-x: auto;
    }

    .data-table table {
        min-width: 600px;
    }
}

/* ========================================
   Dark Mode Support
   ======================================== */
@media (prefers-color-scheme: dark) {
    .feature-card {
        background: var(--color-gray-800);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .feature-card:hover {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    }

    .quick-actions {
        background: var(--color-gray-800);
    }

    .activity-item {
        background: rgba(255, 255, 255, 0.05);
    }

    .admin-card {
        background: var(--color-gray-800);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .admin-card:hover {
        background: var(--color-gray-700);
    }

    .metric-card,
    .chart-card,
    .data-table {
        background: var(--color-gray-800);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .data-table thead {
        background: var(--color-gray-900);
    }
}

/* ========================================
   Scan Photos Button
   ======================================== */
.scan-photos-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #14b8a6;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.scan-photos-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 0.875rem;
  line-height: 1;
}

#scanPhotosBtn {
  position: relative;
}
