/* Core Design System & CSS Variables */
:root {
    --bg-main: #080b11;
    --bg-surface: #111622;
    --bg-surface-hover: #171e2e;
    --border-color: #1e293b;
    --border-color-hover: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #3b82f6;
    
    /* Specific Module Accents */
    --accent-sindex: #3b82f6;      /* Blue */
    --accent-culture: #10b981;     /* Emerald */
    --accent-fate: #f97316;        /* Orange */
    --accent-morphology: #a855f7;  /* Purple */
    --accent-assistant: #14b8a6;   /* Teal */
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Plus Jakarta Sans', var(--font-sans);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
}

/* Reset and Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(8, 11, 17, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top-bar {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.mobile-menu-btn {
    display: none;
}

.header-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.025em;
}

.logo-symbol {
    font-size: 1.5rem;
}

.logo-highlight {
    color: var(--accent-primary);
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background-color: rgba(16, 185, 129, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    white-space: nowrap;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    flex-shrink: 0;
}

/* Main Layout Wrapper */
.app-main {
    flex: 1;
    padding: 3rem 2.5rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.main-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.text-glow {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

/* Card Styles */
.module-card {
    position: relative;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: hidden;
    transition: var(--transition-smooth);
}

/* Glowing Border effect */
.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.module-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-accent);
    background-color: var(--bg-surface-hover);
}

/* Custom Card Shadows/Glows based on Accents */
.card-sindex { --card-accent: var(--accent-sindex); }
.card-culture { --card-accent: var(--accent-culture); }
.card-fate { --card-accent: var(--accent-fate); }
.card-morphology { --card-accent: var(--accent-morphology); }
.card-assistant { --card-accent: var(--accent-assistant); }

.card-sindex:hover { box-shadow: 0 12px 32px -8px rgba(59, 130, 246, 0.25); }
.card-culture:hover { box-shadow: 0 12px 32px -8px rgba(16, 185, 129, 0.25); }
.card-fate:hover { box-shadow: 0 12px 32px -8px rgba(249, 115, 22, 0.25); }
.card-morphology:hover { box-shadow: 0 12px 32px -8px rgba(168, 85, 247, 0.25); }
.card-assistant:hover { box-shadow: 0 12px 32px -8px rgba(20, 184, 166, 0.25); }

/* Card Content Details */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-accent);
    transition: var(--transition-smooth);
}

.module-card:hover .card-icon {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-description {
    font-size: 0.925rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.card-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--card-accent);
    align-self: flex-start;
    margin-top: 0.5rem;
    transition: var(--transition-smooth);
}

.card-btn .arrow {
    transition: transform 0.2s ease;
}

.module-card:hover .card-btn .arrow {
    transform: translateX(4px);
}

/* Footer Section styling */
.app-footer {
    border-top: 1px solid var(--border-color);
    background-color: rgba(5, 7, 12, 0.6);
    padding: 2.5rem 2.5rem;
    margin-top: auto;
}

.disclaimer-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--border-radius-md);
    padding: 1.25rem 1.75rem;
    max-width: 900px;
    margin: 0 auto 1.5rem auto;
    box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.02);
}

.disclaimer-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.disclaimer-text {
    font-size: 0.875rem;
    color: #fca5a5;
    line-height: 1.5;
}

.disclaimer-text strong {
    color: #ef4444;
}

.footer-meta {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Placeholder Subpage Styles */
.placeholder-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 1rem;
    width: 100%;
}

.placeholder-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
}

.placeholder-icon {
    font-size: 3rem;
}

.placeholder-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a855f7;
    background-color: rgba(168, 85, 247, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.placeholder-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
}

.placeholder-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.placeholder-status-list {
    width: 100%;
    background-color: rgba(0,0,0,0.15);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.success {
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.status-dot.pending {
    background-color: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.back-btn {
    margin-top: 1rem;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--border-color);
    border: 1px solid var(--border-color-hover);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.back-btn:hover {
    background-color: var(--border-color-hover);
    color: var(--text-primary);
}

/* Dashboard Layout & Controls */
.dashboard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.75rem;
}

.back-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    transition: var(--transition-smooth);
}

.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-3px);
}

.dashboard-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 750px;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.primary-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.4);
}

.btn-icon {
    font-size: 1rem;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    position: relative;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.stat-card.highlighted {
    border-color: rgba(249, 115, 22, 0.3);
}

.card-glow-highlight {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0) 70%);
    pointer-events: none;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

/* Icon colors */
.sindex-blue { color: var(--accent-sindex); border-color: rgba(59, 130, 246, 0.2); background-color: rgba(59, 130, 246, 0.05); }
.sindex-emerald { color: var(--accent-culture); border-color: rgba(16, 185, 129, 0.2); background-color: rgba(16, 185, 129, 0.05); }
.sindex-purple { color: var(--accent-morphology); border-color: rgba(168, 85, 247, 0.2); background-color: rgba(168, 85, 247, 0.05); }
.sindex-orange { color: var(--accent-fate); border-color: rgba(249, 115, 22, 0.2); background-color: rgba(249, 115, 22, 0.05); }

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-change {
    font-size: 0.75rem;
}

/* Table Section & Dashboard Table */
.table-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.table-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.table-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.dashboard-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

/* Empty Table State Styling */
.empty-state-row td {
    padding: 0;
    border-bottom: none;
}

.table-empty-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    gap: 0.5rem;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.empty-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* Analytics Layout (2 columns) */
.analytics-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.analytics-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0; /* Prevents flex items from overflowing */
}

.analytics-sidebar {
    width: 360px;
    flex-shrink: 0;
}

/* Search Bar styling */
.search-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1.25rem;
    transition: var(--transition-smooth);
}

.search-bar-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.search-bar-wrapper input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    width: 100%;
}

.search-icon {
    opacity: 0.6;
    font-size: 1rem;
}

/* Table Row Click States */
.clickable-row {
    cursor: pointer;
    transition: var(--transition-smooth);
}

.clickable-row:hover td {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.clickable-row.active-row td {
    background-color: rgba(59, 130, 246, 0.08) !important;
    border-bottom-color: rgba(59, 130, 246, 0.3) !important;
}

.dataset-cell-title {
    font-weight: 600;
    color: var(--text-primary);
}

/* Badges for scores */
.score-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.score-badge.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.score-badge.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

/* Detail Panel on Sidebar */
.detail-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    position: sticky;
    top: 100px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.detail-panel-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0) 70%);
    pointer-events: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.panel-status {
    font-size: 0.7rem;
    font-weight: 700;
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.panel-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.detail-value.text-italic {
    font-style: italic;
    color: var(--text-secondary);
}

.detail-value.doi-link {
    font-family: monospace;
    color: #60a5fa;
    word-break: break-all;
}

.detail-score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-score-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.no-margin {
    margin: 0 !important;
}

/* Demo Badge style */
.demo-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    margin-left: 1rem;
    vertical-align: middle;
}

/* Compliance Charts styling */
.charts-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.charts-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.chart-card {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container {
    width: 100%;
    height: 260px;
    position: relative;
}

/* Comparison Module styles */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Responsiveness Settings */
@media (max-width: 1024px) {
    .analytics-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .analytics-sidebar {
        width: 100%;
    }

    .detail-panel {
        position: static;
    }

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

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

@media (max-width: 768px) {
    /* Header & Hamburger Navigation */
    .app-header {
        flex-direction: column;
        align-items: stretch;
        padding: 0.65rem 1rem;
        gap: 0;
    }
    
    .header-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .header-right-tools {
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 11px 9px;
        background: transparent;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        cursor: pointer;
        transition: var(--transition-smooth);
        touch-action: manipulation;
    }

    .mobile-menu-btn:hover, .mobile-menu-btn:focus {
        border-color: var(--accent-primary);
        background-color: rgba(59, 130, 246, 0.1);
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-primary);
        border-radius: 2px;
        transition: var(--transition-smooth);
        transform-origin: center;
    }

    .mobile-menu-btn.is-active .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-menu-btn.is-active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.is-active .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .header-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 0.65rem;
        padding-top: 0.65rem;
        border-top: 1px solid var(--border-color);
        gap: 0.35rem;
    }

    .header-nav.nav-open {
        display: flex;
    }

    .nav-link {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
        width: 100%;
    }

    .header-status {
        padding: 0.25rem 0.6rem;
        font-size: 0.68rem;
        gap: 0.35rem;
        letter-spacing: 0.03em;
        border-radius: 12px;
    }

    /* Spacing & Hero Layout */
    .app-main {
        padding: 1.25rem 0.85rem;
        width: 100%;
    }

    .main-content-wrapper {
        gap: 1.75rem;
    }

    .hero-section {
        margin: 0 auto 0.75rem;
        padding: 0 0.35rem;
    }

    .hero-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-title {
        font-size: 1.65rem;
        line-height: 1.25;
        margin-bottom: 0.75rem;
        word-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 0.92rem;
        line-height: 1.45;
    }

    /* Single Column Cards & Dashboard Grids */
    .modules-grid, .stats-grid, .charts-grid, .comparison-grid, .detail-score-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .module-card, .stat-card, .chart-card, .detail-panel {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .module-card {
        padding: 1.35rem;
    }

    .dashboard-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    /* Touch Friendly Buttons (Min 44px) */
    .card-btn, .action-btn, .primary-btn, .secondary-btn, button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }

    /* Scrollable Tables */
    .table-container, .table-section {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-left: 0;
        margin-right: 0;
    }

    .dashboard-table {
        min-width: 580px;
    }

    /* Responsive Charts & Containers */
    .chart-container {
        height: 240px !important;
        max-width: 100%;
    }

    .charts-section {
        padding: 1.25rem;
    }

    /* Footer Mobile Adjustments */
    .app-footer {
        padding: 1.5rem 1rem;
    }
}

/* Small Smartphone Breakpoints (320px - 414px) */
@media (max-width: 414px) {
    .hero-title {
        font-size: 1.45rem;
    }
    .hero-subtitle {
        font-size: 0.88rem;
    }
    .header-logo a {
        font-size: 1.2rem;
    }
    .app-main {
        padding: 1rem 0.65rem;
    }
}
