/* ==========================================================================
   FILE: 3_Source_Code/decyphr/report_builder/assets/styles/main_theme.css
   PURPOSE: Antigravity Theme - Strict Google Antigravity Aesthetic.
   VERSION: 8.0 (Strict Antigravity)
   ========================================================================== */

/* ==========================================================================
   1. DESIGN SYSTEM & THEME DEFINITIONS (CSS VARIABLES)
   ========================================================================== */
:root {
    /* Typography */
    --font-family: 'Outfit', 'Google Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Colors - Antigravity Light Mode Palette */
    --bg-page: #FFFFFF;
    /* Pure White */
    --bg-card: #F8FAFC;
    /* Slate-50 Card Background */
    --bg-nav: rgba(255, 255, 255, 0.85);
    /* Glassmorphism Light */

    --text-primary: #0F172A;
    /* Slate-900 (Deep/Sharp) */
    --text-secondary: #64748B;
    /* Slate-500 */
    --text-tertiary: #94A3B8;
    /* Slate-400 */

    --border-light: rgba(0, 0, 0, 0.05);
    /* Subtle border */

    /* Brand Colors */
    --accent-primary: #4F46E5;
    /* Indigo-600 */
    --accent-secondary: #818CF8;
    /* Indigo-400 */

    /* Status Colors */
    --status-success-bg: #DCFCE7;
    /* Green-100 */
    --status-success-text: #166534;
    /* Green-800 */
    --status-warning-bg: #FEF3C7;
    /* Amber-100 */
    --status-warning-text: #92400E;
    /* Amber-800 */
    --status-error-bg: #FEE2E2;
    /* Red-100 */
    --status-error-text: #B91C1C;
    /* Red-800 */

    /* Metrics & Spacing */
    --radius-card: 24px;
    --radius-pill: 9999px;
    --spacing-card: 32px;
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Plotly Reset */
.js-plotly-plot .plotly {
    background-color: transparent !important;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.app-header {
    position: sticky;
    top: 20px;
    /* Floating effect */
    width: 95%;
    /* Clean margins */
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-pill);
    z-index: 1000;
    padding: 12px 24px;
    /* Reduced side padding */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Changed from space-between */
    gap: 24px;
    /* Defined gap between Logo and Nav */
    /* Subtle border for definition */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Scroll Container Wrapper */
.nav-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    /* Takes available space */
    min-width: 0;
    /* Allows shrinking below content size */
    margin-right: 16px;
    position: relative;
}

.top-nav {
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
    white-space: nowrap;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.top-nav::-webkit-scrollbar {
    display: none;
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    padding-right: 8px;
    /* Small buffer */
    margin: 0;
}

.top-nav li a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
    display: inline-block;
    /* Ensure they behave nicely */
    white-space: nowrap;
}

.top-nav li a:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

.top-nav li a.active {
    background-color: var(--text-primary);
    color: #FFFFFF;
}

.nav-scroll-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.nav-scroll-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    transform: translateX(2px);
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    /* Push to the far right */
    flex-shrink: 0;
}

.theme-toggle-button {
    display: none;
    /* Enforcing Antigravity Light Theme */
}

/* ==========================================================================
   4. LAYOUT & TYPOGRAPHY
   ========================================================================== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 120px 20px;
}

.report-header {
    margin-bottom: 80px;
    text-align: left;
}

.report-header h2 {
    font-size: 4rem;
    /* Hero size */
    font-weight: 400;
    /* Regular for that minimal tech feel */
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.report-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
}

.section-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ==========================================================================
   5. CARDS & CONTAINERS (The Antigravity Look)
   ========================================================================== */
.details-card,
.analysis-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-card);
    padding: var(--spacing-card);
    margin-bottom: 32px;
    /* Flat design - No Borders, No Shadows */
    border: none;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    /* For corner containment */
}

.details-card h3,
.analysis-card h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    font-weight: 500;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

/* ==========================================================================
   6. TABLES (Clean & Structured)
   ========================================================================== */
.details-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.details-table th {
    text-align: left;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.details-table td {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Extremely subtle separators */
    color: var(--text-primary);
}

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

/* Data Preview Table specific styles */
.table-responsive {
    overflow-x: auto;
}

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

.preview-table th {
    background-color: transparent;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    text-align: left;
    padding: 12px;
    font-weight: 600;
}

.preview-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

/* ==========================================================================
   7. UTILITIES
   ========================================================================== */
.overview-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Code Blocks */
pre {
    background: transparent !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
}

/* KPI Numbers */
.kpi-value {
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.kpi-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==========================================================================
   8. SPECIFIC COMPONENT STYLES
   ========================================================================== */

/* Insight List */
.insight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.insight-list li::before {
    content: "•";
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: -2px;
}

/* Quick Nav Chips */
.chip-container-wrapper {
    position: relative;
    margin-bottom: 32px;
}

.chip-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    /* For scrollbar space */
    scrollbar-width: none;
}

.chip-container::-webkit-scrollbar {
    display: none;
}

.nav-chip {
    text-decoration: none;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
}

.nav-chip:hover {
    background-color: var(--accent-secondary);
    color: var(--accent-primary);
    border-color: transparent;
}