/* ==========================================================================
   CONSOLIDATED DESIGN SYSTEM & CUSTOM VARIANT TOKENS
   ========================================================================== */

:root {
    /* Layout Surface Palettes */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
  --bs-primary-rgb: 13, 110, 253;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-success-rgb: 25, 135, 84;
  --bs-info-rgb: 13, 202, 240;
  --bs-warning-rgb: 255, 193, 7;
  --bs-danger-rgb: 220, 53, 69;
  --bs-light-rgb: 248, 249, 250;
  --bs-dark-rgb: 33, 37, 41;
  --bs-primary-text-emphasis: #052c65;
  --bs-secondary-text-emphasis: #2b2f32;
  --bs-success-text-emphasis: #0a3622;
  --bs-info-text-emphasis: #055160;
    /* Corporate/Asset Accent Brand Mappings */
    --corporate-color: #4f46e5;     /* Consolidated Indigo */
    --corporate-light: #e0e7ff;
    --centhaquine-color: #0d9488;   /* Teal */
    --centhaquine-light: #f0fdfa;
    --sovateltide-color: #ea580c;   /* Orange */
    --sovateltide-light: #fff7ed;

    /* Shadow Infrastructure */
    --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Dark Theme Surface Variable Overrides */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --corporate-light: rgba(79, 70, 229, 0.15);
    --centhaquine-light: rgba(13, 148, 136, 0.15);
    --sovateltide-light: rgba(234, 88, 12, 0.15);
}

/* Base DOM Setup Elements */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
}

/* Metric Highlights Header Panels */
.pxz-metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}
.pxz-metric-card:hover {
    transform: translateY(-4px);
}

/* ==========================================================================
   TIMELINE WRAPPER & AXIS ARCHITECTURE
   ========================================================================== */

.pxz-chronicle-container {
    position: relative;
    padding: 2rem 0;
    width: 100%;
}

/* Central Alignment Structural Baseline */
.pxz-chronicle-axis {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--border-color);
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 2px;
}

/* Row-Item Alignment Foundations */
.pxz-chronicle-item {
    display: flex;
    position: relative;
    width: 50%;
    margin-bottom: 2.5rem;
    z-index: 2;
}

/* Alternating Row Alignment Properties */
.pxz-chronicle-item:nth-child(odd) {
    align-self: flex-start;
    justify-content: flex-end;
    padding-right: 40px;
    left: 0;
}

.pxz-chronicle-item:nth-child(even) {
    align-self: flex-end;
    justify-content: flex-start;
    padding-left: 40px;
    margin-left: 50%;
}

/* ==========================================================================
   CHRONICLE RECEPTACLE NODES & CARDS
   ========================================================================== */

/* Connected Axis Intersection Badges */
.pxz-chronicle-node {
    position: absolute;
    top: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.pxz-chronicle-item:nth-child(odd) .pxz-chronicle-node {
    right: -21px;
}

.pxz-chronicle-item:nth-child(even) .pxz-chronicle-node {
    left: -21px;
}

/* Color Mapped Context Node Borders */
.pxz-chronicle-node.border-indigo { border-color: var(--corporate-color) !important; }
.pxz-chronicle-node.border-teal { border-color: var(--centhaquine-color) !important; }
.pxz-chronicle-node.border-orange { border-color: var(--sovateltide-color) !important; }

/* Milestone Core Content Surface (Strictly Un-underlined) */
.pxz-chronicle-card {
    flex-grow: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    width: 100%;
    max-width: 580px;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
}

.pxz-chronicle-card * {
    text-decoration: none !important;
}

.pxz-chronicle-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Speech Bubble Layout Pointers */
.pxz-chronicle-card::after {
    content: '';
    position: absolute;
    top: 34px;
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.pxz-chronicle-item:nth-child(odd) .pxz-chronicle-card::after {
    right: -6px;
    border-right: 1px solid var(--border-color);
}

.pxz-chronicle-item:nth-child(even) .pxz-chronicle-card::after {
    left: -6px;
    border-left: 1px solid var(--border-color);
    transform: rotate(-135deg);
}

/* ==========================================================================
   ALTERNATIVE GRID VIEW STATES & COMPONENTS
   ========================================================================== */

.pxz-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.pxz-grid-card-wrapper {
    width: 100%;
}

.pxz-grid-card-wrapper .pxz-chronicle-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 100%;
}

/* ==========================================================================
   COMPONENTS, TEXT TYPOGRAPHY, BUTTON HOVERS, AND PANELS
   ========================================================================== */

/* Search Inputs Placeholder */
#searchInput::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

/* Filter Selection Buttons */
.filter-pill {
    transition: all 0.2s ease-in-out;
}
.bg-secondary {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity)) !important;
}
.btn-outline-teal {
    color: var(--centhaquine-color);
    border-color: var(--centhaquine-color);
}
.btn-outline-teal.active, .btn-outline-teal:hover {
    color: #ffffff !important;
    background-color: var(--centhaquine-color) !important;
    border-color: var(--centhaquine-color) !important;
}

.btn-outline-orange {
    color: var(--sovateltide-color);
    border-color: var(--sovateltide-color);
}
.btn-outline-orange.active, .btn-outline-orange:hover {
    color: #ffffff !important;
    background-color: var(--sovateltide-color) !important;
    border-color: var(--sovateltide-color) !important;
}

.btn-outline-indigo {
    color: var(--corporate-color);
    border-color: var(--corporate-color);
}
.btn-outline-indigo.active, .btn-outline-indigo:hover {
    color: #ffffff !important;
    background-color: var(--corporate-color) !important;
    border-color: var(--corporate-color) !important;
}

.fs-5 {
  font-size: 1.25rem !important;
}
.fs-6 {
  font-size: 1rem !important;
}
.py-1 {
  padding-top: .25rem !important;
  padding-bottom: .25rem !important;
}
.px-3 {
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}
/* Chronicle Typography Configurations */
.pxz-chronicle-year-tag {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* Dynamic Mapped Year-Tag Categorization Colors */
.pxz-chronicle-item[data-year-type="sovateltide"] .pxz-chronicle-year-tag { color: var(--sovateltide-color); }
.pxz-chronicle-item[data-year-type="centhaquine"] .pxz-chronicle-year-tag { color: var(--centhaquine-color); }
.pxz-chronicle-item[data-year-type="corporate"] .pxz-chronicle-year-tag { color: var(--corporate-color); }

.pxz-chronicle-month-tag {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Asset Lifecycle Tracker Bar Area */
.pxz-lifecycle-status-panel {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.pxz-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

/* Category Badge Surface Treatments */
.badge-corporate { background-color: var(--corporate-light); color: var(--corporate-color); font-weight: 700; }
.badge-centhaquine { background-color: var(--centhaquine-light); color: var(--centhaquine-color); font-weight: 700; }
.badge-sovateltide { background-color: var(--sovateltide-light); color: var(--sovateltide-color); font-weight: 700; }

/* ==========================================================================
   RESPONSIVE LAYOUT FLIP (VIEWPORTS BELOW 991PX)
   ========================================================================== */

@media (max-width: 991px) {
    .pxz-chronicle-axis {
        left: 32px;
        transform: none;
    }

    .pxz-chronicle-item {
        width: 100% !important;
        justify-content: flex-start !important;
        margin-left: 0 !important;
        padding-left: 75px !important;
        padding-right: 0 !important;
    }

    .pxz-chronicle-node {
        left: 11px !important;
        right: auto !important;
    }

    .pxz-chronicle-card::after {
        left: -6px !important;
        right: auto !important;
        border-left: 1px solid var(--border-color) !important;
        border-right: none !important;
        transform: rotate(-135deg) !important;
    }
}