/* ==========================================================================
   GLOBAL PRESENTATION FRAMEWORK STYLES - FIXED LAYOUT
   ========================================================================== */

/* Global Smooth Page Loading Animations */
@keyframes globalFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    background-color: #0f172a; /* slate-900 */
    color: #f1f5f9; /* slate-100 */
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    animation: globalFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Structural Header Configuration */
header {
    border-bottom: 1px solid #334155; /* slate-800 */
    background-color: rgba(2, 6, 23, 0.5); /* slate-950/50 */
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #14b8a6; /* teal-400 */
}

header p {
    margin: 0.25rem 0 0 0;
    font-size: 0.75rem;
    color: #94a3b8; /* slate-400 */
}

/* Master Layout Grid Containers */
main {
    max-width: 80rem; /* max-w-7xl */
    margin: 0 auto;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

/* FIXED Horizontal KPI Ribbon Layout */
.kpi-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .kpi-row { 
        flex-direction: row; 
        justify-content: space-between;
    }
    .kpi-card {
        flex: 1;
    }
    .module-grid { 
        display: grid;
        grid-template-cols: repeat(2, minmax(0, 1fr)); 
    }
}

@media (min-width: 1024px) {
    .module-grid { 
        grid-template-cols: repeat(3, minmax(0, 1fr)); 
    }
    .analytics-split { 
        display: grid;
        grid-template-cols: repeat(3, minmax(0, 1fr)); 
    }
}

.module-grid {
    display: grid;
    grid-template-cols: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

.analytics-split {
    display: grid;
    grid-template-cols: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

/* Specialized Dashboard Presentation Component Cards */
.kpi-card {
    background-color: #020617; /* slate-950 */
    border: 1px solid #334155; /* slate-800 */
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-sizing: border-box;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 0.25rem;
}

.kpi-subtext {
    font-size: 0.75rem;
    color: #14b8a6;
    margin: 0.25rem 0 0 0;
}

.kpi-subtext.alt { color: #f97316; } /* orange-400 */
.kpi-subtext.good { color: #34d399; } /* emerald-400 */

/* Interactive Navigation Module Menu Cards */
.presentation-card {
    display: block;
    background-color: #020617;
    border: 1px solid #334155;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.presentation-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(20, 184, 166, 0.5);
}

.card-tag {
    font-family: monospace;
    font-size: 0.75rem;
    color: #14b8a6;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.card-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Subsection Section Header Indicators */
.section-header {
    font-size: 1.125rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-indicator {
    width: 0.5rem;
    height: 1.25rem;
    background-color: #14b8a6;
    border-radius: 0.125rem;
    display: inline-block;
}

/* Infographic Layout Blocks */
.canvas-panel {
    grid-column: span 2 / span 2;
    background-color: #020617;
    border: 1px solid #334155;
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    box-sizing: border-box;
}

.panel-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem 0;
}

.chart-wrapper {
    width: 100%;
    position: relative;
    height: 400px;
}

.chart-tip {
    font-size: 0.75rem;
    color: #64748b;
    margin: 1rem 0 0 0;
    font-style: italic;
    text-align: center;
}

/* Side Drawer Insights */
.side-drawer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.split-stats {
    display: grid;
    grid-template-cols: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.stat-box {
    background-color: #020617;
    border: 1px solid #334155;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    box-sizing: border-box;
}

.stat-box .val-teal { color: #14b8a6; font-size: 1.5rem; font-weight: 900; }
.stat-box .val-orange { color: #f97316; font-size: 1.5rem; font-weight: 900; }
.stat-label { font-size: 0.75rem; color: #94a3b8; display: block; }
.stat-sub { font-size: 0.625rem; color: #64748b; display: block; margin-top: 0.125rem; }

.insights-box {
    background-color: #020617;
    border: 1px solid #334155;
    padding: 1.25rem;
    border-radius: 0.75rem;
    flex: 1;
    box-sizing: border-box;
}

.insights-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 0 0 1rem 0;
}

.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.bullet-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: #14b8a6;
    margin-top: 0.375rem;
    flex-shrink: 0;
}
.bullet-dot.orange { background-color: #f97316; }

.insight-text strong { color: #ffffff; display: block; }

/* Interactive Back Buttons */
.btn-back {
    background-color: #1e293b;
    color: #cbd5e1;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}
.btn-back:hover { background-color: #334155; }

.header-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Inactive Placeholder Blocks */
.placeholder-card {
    padding: 1.5rem;
    background-color: rgba(2, 6, 23, 0.2);
    border: 1px dashed #334155;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    box-sizing: border-box;
}

/* Module Tabs */

.tabs{
    display:flex;
    gap:10px;
    margin-bottom:20px;
}

.tabs button{
    background:#0f172a;
    color:#94a3b8;
    border:none;
    padding:10px 16px;
    cursor:pointer;
    border-bottom:2px solid transparent;
}

.tabs button.active{
    color:#14b8a6;
    border-bottom:2px solid #14b8a6;
}