/* Modern KKM Scorecard Dashboard CSS
   Comprehensive styling system with CSS variables, theming, and responsive design
*/

:root {
    /* Core Colors */
    --primary-bg: #111827; /* Dark Blue */
    --page-bg: #f9fafb;    /* Light Grey */
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    
    /* Status Colors */
    --status-green: #10b981;
    --status-yellow: #f59e0b;
    --status-red: #ef4444;
    --status-blue: #3b82f6;

    /* Dashboard Specific Theme Colors */
    --dash-green-bg: #ecfdf5;
    --dash-green-border: #a7f3d0;
    --dash-green-text: #047857;
    
    --dash-yellow-bg: #fffbeb;
    --dash-yellow-border: #fde68a;
    --dash-yellow-text: #b45309;

    /* Perspective Themes */
    --theme-blue: #3b82f6;
    --theme-green: #10b981;
    --theme-yellow: #f59e0b;
    --theme-purple: #8b5cf6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: var(--text-main);
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
}

html, body { 
    width: 100%; 
    height: 100%; 
}

p {
    line-height: 25px;
}

.row img {
    height: auto;
    max-width: 100%;
}

a {
    text-decoration: none;
    line-height: inherit;
    transition: opacity 0.3s ease-out;
}

iframe {
    border: 0 !important;
}

figure {
    margin: 0;
}

/* Container */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    position: relative; 
    z-index: 2; 
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */

header {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white; 
    padding: 20px 0 80px 0; 
    position: relative; 
    overflow: hidden;
}

header::after {
    content: ""; 
    position: absolute; 
    bottom: -50px; 
    left: 0; 
    width: 100%; 
    height: 100px;
    background-color: var(--page-bg); 
    border-radius: 50% 50% 0 0 / 100% 100% 0 0; 
    transform: scaleX(1.5);
}

.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 60px; 
}

.logo { 
    font-weight: 600; 
    font-size: 1.1rem; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.navbar-actions { 
    display: flex; 
    gap: 12px; 
    align-items: center; 
}

.btn-outline-light {
    background: transparent; 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    color: white;
    padding: 8px 16px; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: all 0.2s; 
    font-size: 0.9rem; 
    text-decoration: none;
}

.btn-outline-light:hover { 
    background: rgba(255, 255, 255, 0.1); 
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero-content { 
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto; 
}

.badge { 
    background: rgba(255, 255, 255, 0.1); 
    padding: 6px 16px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    display: inline-block; 
    margin-bottom: 20px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    color: #94a3b8; 
}

h1 { 
    font-size: 3rem; 
    font-weight: 700; 
    margin-bottom: 15px; 
    line-height: 1.2; 
}

h1 span { 
    color: #60a5fa; 
}

h1 i { 
    font-style: italic; 
}

.subtitle { 
    color: #94a3b8; 
    font-size: 1.1rem; 
    margin-bottom: 40px; 
    font-weight: 300; 
}

.stats-row { 
    display: flex; 
    justify-content: center; 
    gap: 40px; 
    margin-bottom: 40px; 
}

.stat-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.stat-icon { 
    width: 40px; 
    height: 40px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.2rem; 
}

.stat-icon.blue { 
    background: rgba(59, 130, 246, 0.2); 
    color: #60a5fa; 
}

.stat-icon.green { 
    background: rgba(16, 185, 129, 0.2); 
    color: #34d399; 
}

.stat-icon.yellow { 
    background: rgba(245, 158, 11, 0.2); 
    color: #fbbf24; 
}

.stat-text strong { 
    display: block; 
    font-size: 1.5rem; 
    color: white; 
}

.stat-text span { 
    font-size: 0.85rem; 
    color: #94a3b8; 
}

/* =========================================
   BANNER SECTION
   ========================================= */

.banner-flex {
    display: flex;
    align-items: center;
    min-height: 90vh;
    padding-top: 50px;
    padding-bottom: 100px;
    position: relative;
    gap: 50px;
}

.banner-left {
    width: 45%;
    padding: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-heading {
    padding: 0px;
}

.section-heading h1 {
    font-size: 64px;
    font-weight: 900;
    color: #000;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.section-heading h1 i {
    display: block;
    font-style: italic;
    color: #000;
    font-size: 64px;
    margin-top: 0px;
}

.button-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.button {
    flex: 1;
    min-width: 200px;
    font-size: 0.95rem;
    padding: 14px 24px;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid #000;
    border-radius: 6px;
    background: white;
    color: #000;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button:hover {
    background: #000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.button:active {
    transform: translateY(0);
}

.banner-right {
    position: relative;
    display: flex;
    justify-content: center;
    padding-right: 0;
    width: 55%;
    align-items: center;
}

.banner-right img {
    max-width: 150%;
    height: auto;
    display: block;
}

/* =========================================
   TUTORIAL BOX
   ========================================= */

.tutorial-box {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: fit-content;
    background: #ffffff;
    padding: 10px;
    font-size: 0.6rem;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    z-index: 10;
}

.tutorial-box table {
    border-collapse: collapse;
}

.tutorial-box th,
.tutorial-box td {
    border: 1px solid #000000;
    padding: 4px 6px;
    text-align: center;
    vertical-align: middle;
    font-weight: 500;
}

.tutorial-title {
    font-weight: 700;
    letter-spacing: 0.5px;
    background: #ffffff;
}

.tutorial-box a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.3;
    display: block;
}

.tutorial-box a:hover {
    text-decoration: underline;
}

/* =========================================
   FOOTER
   ========================================= */

#landing-footer {
    background: #5a5a5a;
    color: white;
    padding: 40px 60px;
    text-align: center;
    margin-top: 60px;
    clear: both;
}

#landing-footer .row {
    padding: 0;
}

#landing-footer p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

footer { 
    text-align: center; 
    padding: 40px; 
    color: var(--text-muted); 
    font-size: 0.8rem; 
    border-top: 1px solid var(--border-color); 
    margin-top: auto; 
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    
    .banner-flex {
        flex-direction: column;
        min-height: auto;
        padding-top: 40px;
    }
    
    .banner-left,
    .banner-right {
        width: 100%;
        padding: 40px 20px;
    }
    
    .button-container {
        gap: 15px;
    }
    
    .button {
        min-width: 150px;
        padding: 12px 20px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    
    .banner-left {
        padding: 30px 20px;
    }
    
    .section-heading h1 {
        font-size: 2rem;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
    }
    
    .tutorial-box {
        position: absolute;
        bottom: 15px;
        right: 15px;
        font-size: 0.5rem;
    }
    
    #landing-footer {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    h1 { 
        font-size: 1.5rem; 
    }
    
    .section-heading h1 {
        font-size: 1.5rem;
    }
    
    .section-heading h1 i {
        font-size: 1.2rem;
    }
    
    .banner-left {
        padding: 20px 15px;
        gap: 15px;
    }
    
    .banner-flex {
        padding-top: 20px;
        padding-bottom: 40px;
    }
    
    .button {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .tutorial-box {
        font-size: 0.45rem;
        bottom: 10px;
        right: 10px;
    }
    
    .tutorial-box th,
    .tutorial-box td {
        padding: 3px 4px;
    }
    
    #landing-footer {
        padding: 20px 15px;
    }
}
:root {
    /* Core Colors */
    --primary-bg: #111827; /* Dark Blue */
    --page-bg: #f9fafb;    /* Light Grey */
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    
    /* Status Colors */
    --status-green: #10b981;
    --status-yellow: #f59e0b;
    --status-red: #ef4444;
    --status-blue: #3b82f6;

    /* Dashboard Specific Theme Colors */
    --dash-green-bg: #ecfdf5;
    --dash-green-border: #a7f3d0;
    --dash-green-text: #047857;
    
    --dash-yellow-bg: #fffbeb;
    --dash-yellow-border: #fde68a;
    --dash-yellow-text: #b45309;

    /* Perspective Themes */
    --theme-blue: #3b82f6;
    --theme-green: #10b981;
    --theme-yellow: #f59e0b;
    --theme-purple: #8b5cf6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--page-bg);
    color: var(--text-main);
    display: flex; flex-direction: column; min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }

/* =========================================
   1. LANDING PAGE & SHARED HEADER
   ========================================= */
header {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white; padding: 20px 0 80px 0; position: relative; overflow: hidden;
}
header::after {
    content: ""; position: absolute; bottom: -50px; left: 0; width: 100%; height: 100px;
    background-color: var(--page-bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: scaleX(1.5);
}

.navbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 60px; }
.logo { font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.navbar-actions { display: flex; gap: 12px; align-items: center; }
.btn-outline-light {
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); color: white;
    padding: 8px 16px; border-radius: 6px; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; text-decoration: none;
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); }
.btn-logout {
    background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.5); color: #fca5a5;
    padding: 8px 16px; border-radius: 6px; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; text-decoration: none;
    display: flex; align-items: center; gap: 6px;
}
.btn-logout:hover { background: rgba(239, 68, 68, 0.3); border-color: rgba(239, 68, 68, 0.7); color: #fecaca; }

/* Settings/Hamburger Menu */
.btn-settings {
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    color: white;
    padding: 8px 12px; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: all 0.2s; 
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-settings:hover { 
    background: rgba(255, 255, 255, 0.2); 
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-menu-container {
    position: relative;
}

.settings-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    margin-top: 8px;
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #1f2937;
    transition: all 0.2s;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}
.dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-item:hover {
    background-color: #f3f4f6;
}
.dropdown-item i {
    color: #ec4899;
    font-size: 1.1rem;
}

.btn-semak-kpi {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}

.btn-semak-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.hero-content { text-align: center; max-width: 800px; margin: 0 auto; }
h1 { font-size: 3rem; font-weight: 700; margin-bottom: 15px; line-height: 1.2; }
h1 span { color: #60a5fa; }
.subtitle { color: #94a3b8; font-size: 1.1rem; margin-bottom: 40px; font-weight: 300; }
.badge { background: rgba(255, 255, 255, 0.1); padding: 6px 16px; border-radius: 20px; font-size: 0.8rem; display: inline-block; margin-bottom: 20px; border: 1px solid rgba(255, 255, 255, 0.1); color: #94a3b8; }

.stats-row { display: flex; justify-content: center; gap: 40px; margin-bottom: 40px; }
.stat-item { display: flex; align-items: center; gap: 12px; }
.stat-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.stat-icon.green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.stat-text strong { display: block; font-size: 1.5rem; color: white; }
.stat-text span { font-size: 0.85rem; color: #94a3b8; }

/* Controls & Grid */
.controls-section { margin-top: 20px; margin-bottom: 30px; display: flex; justify-content: space-between; gap: 20px; }
.search-box { position: relative; flex-grow: 1; max-width: 400px; }
.search-box input { width: 100%; padding: 12px 12px 12px 40px; border: 1px solid var(--border-color); border-radius: 8px; outline: none; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.filter-btn { background: white; border: 1px solid var(--border-color); padding: 10px 20px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 60px; }
.card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 24px; transition: transform 0.2s, box-shadow 0.2s; position: relative;
    display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.card-icon { width: 48px; height: 48px; background: #1e293b; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-green { background-color: var(--status-green); }
.status-yellow { background-color: var(--status-yellow); }
.status-red { background-color: var(--status-red); }
.status-blue { background-color: var(--status-blue); }

.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 10px; color: var(--text-main); }
.card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; flex-grow: 1; margin-bottom: 24px; }
.card-footer { margin-top: auto; }
.card-status { display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 500; color: #6b7280; background-color: #f3f4f6; }
.card-actions { display: flex; gap: 12px; margin-top: auto; }
.btn-card {
    flex: 1; padding: 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 500;
    cursor: pointer; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s;
}
.btn-scorecard { background: white; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-scorecard:hover { background: #f3f4f6; }
.btn-dashboard { background: #1e293b; border: 1px solid #1e293b; color: white; }
.btn-dashboard:hover { background: #0f172a; }
.btn-checklist { background: #3b82f6; border: 1px solid #3b82f6; color: white; }
.btn-checklist:hover { background: #2563eb; }
.btn-like { 
    background: #fce7f3; 
    border: 1px solid #fbcfe8; 
    color: #ec4899;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-like:hover { 
    background: #fbcfe8; 
    border-color: #f472b6;
}
.btn-like.liked { 
    background: #ec4899; 
    border-color: #ec4899; 
    color: white;
    animation: heart-pulse 0.5s ease;
}
.btn-like.liked:hover { 
    background: #db2777; 
    border-color: #db2777;
}
.btn-like:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes heart-pulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* =========================================
   2. DASHBOARD PAGE (Dark Header + KPI Grid)
   ========================================= */

/* Dark Header Container */
.dashboard-header-wrapper {
    background-color: var(--primary-bg);
    color: white;
    padding: 30px 0 100px 0; /* Extra padding for content overlap */
    border-bottom: 1px solid #374151;
}

.back-nav {
    color: #9ca3af; text-decoration: none; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px;
    transition: color 0.2s;
}
.back-nav:hover { color: white; }

.dash-hero { display: flex; justify-content: space-between; align-items: flex-start; }

.hero-badge {
    display: inline-block; padding: 6px 14px; border-radius: 20px;
    font-size: 0.85rem; font-weight: 600; margin-bottom: 15px;
}
/* Badge Colors */
.hero-badge.Dalam-Landasan, .status-badge.Dalam-Landasan { background: #d1fae5; color: #065f46; }
.hero-badge.Berisiko, .status-badge.Berisiko { background: #fef3c7; color: #92400e; }
.hero-badge.Tertangguh, .status-badge.Tertangguh { background: #fee2e2; color: #991b1b; }

#headerTitle { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; line-height: 1.2; }
#headerDesc { color: #9ca3af; font-size: 1.1rem; max-width: 600px; }

/* Overall Score Floating Card */
.score-box-dark {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 20px 30px;
    min-width: 220px;
    backdrop-filter: blur(10px);
}
.sb-label { color: #9ca3af; font-size: 0.85rem; margin-bottom: 5px; }
.sb-value { font-size: 3.5rem; font-weight: 700; color: white; line-height: 1; margin-bottom: 5px; }
.sb-sub { color: #10b981; font-size: 0.8rem; font-weight: 500; }

/* Main Content Offset (pulls content up) */
.main-content-offset { margin-top: -50px; position: relative; z-index: 2; padding-bottom: 60px; }

.section-heading {
    font-size: 1.3rem; font-weight: 700; color: var(--text-main);
    display: flex; align-items: center; gap: 10px; margin-bottom: 25px;
}

/* KPI GRID DASHBOARD */
.kpi-grid-dashboard {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.kpi-card {
    border-radius: 12px; padding: 24px;
    border: 1px solid transparent;
    display: flex; flex-direction: column;
}

/* KPI Theme: Green */
.kpi-card.green {
    background-color: var(--dash-green-bg);
    border-color: var(--dash-green-border);
}
/* KPI Theme: Yellow */
.kpi-card.yellow {
    background-color: var(--dash-yellow-bg);
    border-color: var(--dash-yellow-border);
}
/* KPI Theme: Red */
.kpi-card.red {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.kpi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.kpi-title-row { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; color: var(--text-main); }
.kpi-icon-box {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1rem;
}
.kpi-card.green .kpi-icon-box { background-color: #059669; }
.kpi-card.yellow .kpi-icon-box { background-color: #d97706; }
.kpi-card.red .kpi-icon-box { background-color: #dc2626; }

.kpi-status-pill {
    font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.6); border: 1px solid rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 5px;
}
.kpi-card.green .kpi-status-pill { color: var(--dash-green-text); }
.kpi-card.yellow .kpi-status-pill { color: var(--dash-yellow-text); }
.kpi-card.red .kpi-status-pill { color: #7f1d1d; }

.kpi-big-number { font-size: 2.8rem; font-weight: 700; color: var(--text-main); margin-bottom: 5px; }
.kpi-big-number span { font-size: 1.2rem; font-weight: 500; color: var(--text-muted); }

.kpi-target-row {
    display: flex; justify-content: space-between; font-size: 0.8rem;
    color: var(--text-muted); margin-bottom: 10px;
}

.kpi-progress-bg {
    width: 100%; height: 8px; background: rgba(0,0,0,0.08); border-radius: 4px; overflow: hidden; margin-bottom: 20px;
}
.kpi-progress-fill { height: 100%; border-radius: 4px; }
.kpi-card.green .kpi-progress-fill { background-color: var(--status-green); }
.kpi-card.yellow .kpi-progress-fill { background-color: var(--status-yellow); }
.kpi-card.red .kpi-progress-fill { background-color: var(--status-red); }

.kpi-insight-box {
    margin-top: auto; padding: 12px 16px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 500; border: 1px solid rgba(0,0,0,0.05);
}
.kpi-card.green .kpi-insight-box { background-color: #d1fae5; color: #065f46; }
.kpi-card.yellow .kpi-insight-box { background-color: #fef3c7; color: #92400e; }
.kpi-card.red .kpi-insight-box { background-color: #fee2e2; color: #7f1d1d; }


/* PERSPECTIVES STACK */
.perspectives-vertical-stack { display: flex; flex-direction: column; gap: 30px; margin-bottom: 60px; }

.perspective-row {
    background: white; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 30px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
/* Side Borders */
.perspective-row.financial { border-left: 6px solid var(--theme-blue); }
.perspective-row.customer { border-left: 6px solid var(--theme-green); }
.perspective-row.internal { border-left: 6px solid var(--theme-yellow); }
.perspective-row.learning { border-left: 6px solid var(--theme-purple); }

.p-row-header { display: flex; align-items: center; gap: 15px; margin-bottom: 30px; }
.p-icon-sq {
    width: 44px; height: 44px; border-radius: 10px; color: white;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
/* Icon Colors */
.perspective-row.financial .p-icon-sq { background: var(--theme-blue); }
.perspective-row.customer .p-icon-sq { background: var(--theme-green); }
.perspective-row.internal .p-icon-sq { background: var(--theme-yellow); }
.perspective-row.learning .p-icon-sq { background: var(--theme-purple); }

.p-title { font-size: 1.25rem; font-weight: 700; color: var(--text-main); }

.p-metrics-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center;
}

/* Needle Gauge CSS (Highcharts Style) */
.gauge-container {
    position: relative;
    width: 140px; 
    height: 140px; 
    margin: 0 auto 15px auto; 
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Colored Background Ring */
.gauge-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 225deg, 
        #ec0909 0deg 162deg, 
        #DDDF0D 162deg 216deg, 
        #63df53 216deg 270deg, 
        transparent 270deg
    );
    -webkit-mask: radial-gradient(transparent 58%, black 59%);
    mask: radial-gradient(transparent 58%, black 59%);
}

/* The Inner Circle (Donut Hole + Text) */
.gauge-center-cover {
    position: absolute;
    width: 75%; 
    height: 75%; 
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

/* Text Styling */
.metric-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    font-weight: 600;
}
.g-percent {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}
.g-target {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* The Needle */
.gauge-needle {
    position: absolute;
    top: 50%; left: 50%;
    width: 45%; 
    height: 3px;
    background: #1f2937;
    transform-origin: left center;
    border-radius: 2px;
    z-index: 10;
    transition: transform 1s ease-out;
}

/* The Needle Center Pivot Dot */
.gauge-needle::before {
    content: '';
    position: absolute;
    left: -6px; top: -5px;
    width: 12px; height: 12px;
    background: #1f2937;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

/* Footer */
footer { text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border-color); margin-top: auto; }

/* Responsive */
@media (max-width: 1024px) {
    .card-grid, .kpi-grid-dashboard, .p-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .card-grid, .kpi-grid-dashboard, .p-metrics-grid { grid-template-columns: 1fr; }
    .dash-hero { flex-direction: column; gap: 20px; }
    .score-box-dark { width: 100%; }
}

/* =========================================
   3. MODAL (POPUP) STYLES
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 1000; display: none; align-items: center; justify-content: center;
}
.modal-box {
    background: white; width: 90%; max-width: 950px; border-radius: 16px; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-header {
    background: #111827; color: white; padding: 30px 40px; position: relative;
}
.close-btn {
    position: absolute; top: 25px; right: 25px; background: transparent; border: none; color: #9ca3af; font-size: 1.2rem; cursor: pointer;
}
.modal-top-row { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.modal-title-row { display: flex; justify-content: space-between; align-items: flex-end; }
.modal-title-row h2 { font-size: 1.8rem; margin: 0; }
.modal-overall-box {
    background: #1f2937; border: 1px solid #374151; border-radius: 12px;
    padding: 10px 20px; text-align: center; min-width: 100px;
}
.modal-score-val { font-size: 1.8rem; font-weight: 700; color: white; line-height: 1; }
.modal-score-label { font-size: 0.7rem; color: #9ca3af; }

.modal-body { padding: 30px; background: #f9fafb; }
.modal-p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.modal-p-card { border-radius: 12px; padding: 20px; border: 1px solid; }
/* Modal Card Colors */
.mp-blue { background: #eff6ff; border-color: #bfdbfe; }
.mp-green { background: #ecfdf5; border-color: #a7f3d0; }
.mp-yellow { background: #fffbeb; border-color: #fde68a; }
.mp-purple { background: #f3e8ff; border-color: #d8b4fe; }

.mp-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; font-weight: 600; font-size: 1rem; color: var(--text-main); }
.mp-metric { margin-bottom: 12px; }
.mp-m-top { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 5px; font-weight: 500; }
.mp-bar-bg { width: 100%; height: 6px; background: rgba(0,0,0,0.06); border-radius: 3px; }
.mp-bar-fill { height: 100%; border-radius: 3px; }

/* Add KPI Button */
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.btn-add-kpi { 
    display: inline-flex; align-items: center; gap: 8px; 
    padding: 12px 24px; 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
    color: white; border: none; border-radius: 8px; 
    text-decoration: none; font-size: 0.95rem; font-weight: 600; 
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}
.btn-add-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.btn-add-kpi:hover::before {
    left: 100%;
}
.btn-add-kpi:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}
.btn-add-kpi:active {
    transform: translateY(-1px);
}

/* Add Status Button */
.btn-add-status { 
    display: inline-flex; align-items: center; gap: 8px; 
    padding: 12px 24px; 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); 
    color: white; border: none; border-radius: 8px; 
    text-decoration: none; font-size: 0.95rem; font-weight: 600; 
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    position: relative;
    overflow: hidden;
}
.btn-add-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.btn-add-status:hover::before {
    left: 100%;
}
.btn-add-status:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}
.btn-add-status:active {
    transform: translateY(-1px);
}

/* Checklist Button */
.btn-checklist { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
    color: white; border: none; padding: 12px 20px; 
    border-radius: 8px; font-size: 0.9rem; font-weight: 600; 
    cursor: pointer; display: flex; align-items: center; gap: 6px; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}
.btn-checklist::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.btn-checklist:hover::before {
    left: 100%;
}
.btn-checklist:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
.btn-checklist:active {
    transform: translateY(-1px);
}
.tutorial-title {
            color: #000 !important;
            font-weight: 700;
        }