/* =========================================================
   MYRUNPERF — MAIN.CSS
   Version premium dark dashboard
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #111418;
    color: #d7dde5;
    line-height: 1.6;
}


/* =========================================================
   LAYOUT
   ========================================================= */

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    margin-bottom: 32px;
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 14px;
}

.main-nav {
    margin-bottom: 20px;
}

.main-nav a {
    color: #c8d0da;
    text-decoration: none;
    margin-right: 16px;
    font-size: 14px;
    transition: 0.2s;
}

.main-nav a:hover {
    color: #ff8a00;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    background: #1a1f27;
    border: 1px solid #2b3442;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

.card h1 {
    font-size: 24px;
    font-weight: 700;
}

.card h2,
.card h3 {
    font-size: 16px;
    font-weight: 600;
}


/* =========================================================
   HERO TOP
   ========================================================= */

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 14px;
    color: #c8d0da;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.big-number {
    font-size: 30px;
    font-weight: 700;
    margin-top: 8px;
}

.sub-text {
    margin-top: 8px;
    font-size: 14px;
    color: #9aa4b2;
}


/* =========================================================
   MAIN ANALYSIS GRID
   MAP LEFT / CHARTS RIGHT
   ========================================================= */

.main-analysis-grid {
    display: grid;
    grid-template-columns: 0.9fr 2.1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}

.map-card {
    position: sticky;
    top: 24px;
}

.map-container {
    height: 540px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 16px;
}

.charts-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* =========================================================
   CHARTS
   ========================================================= */

.chart-container {
    margin-top: 16px;
}

.chart-container canvas {
    width: 100% !important;
    height: 240px !important;
}


/* =========================================================
   TABLES
   ========================================================= */

.table-modern {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.table-modern th,
.table-modern td {
    padding: 10px;
    font-size: 14px;
    text-align: left;
    border-bottom: 1px solid #2e3540;
}

.table-modern th {
    color: #b7bec8;
    font-weight: 500;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    background: #232933;
    border: 1px solid #39414d;
    color: #f5f5f5;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.btn:hover {
    border-color: #ff8a00;
}

.chart-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.filter-btn {
    padding: 8px 14px;
    border: 1px solid #39414d;
    background: #232933;
    color: #f5f5f5;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.filter-btn:hover {
    border-color: #ff8a00;
}

.filter-btn.active {
    border-color: #ff8a00;
    background: rgba(255, 138, 0, 0.08);
}

/* =========================================================
   FORMS
   ========================================================= */

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background: #161a20;
    border: 1px solid #2e3540;
    border-radius: 10px;
    color: #f5f5f5;
    font-size: 14px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #ff8a00;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #c8d0da;
}


/* =========================================================
   SMALL HELPERS
   ========================================================= */

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-muted {
    color: #b7bec8;
}

.text-highlight {
    color: #ff8a00;
}

/* =========================================
   SEGMENTS TABLE — PREMIUM DARK
========================================= */

.segments-card {
    background: #1a1f27;
    border: 1px solid #2b3442;
    border-radius: 18px;
    padding: 28px;
    margin-top: 28px;
}

.segments-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #dce3ec;
}


/* wrapper */

.segments-table-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    margin-top: 20px;
    padding: 4px 8px;
}

/* table */

.segments-table {
    width: 100%;
    min-width: 1300px;
    border-collapse: collapse;
    color: #cfd7e3;
    font-size: 14px;
}


/* header */

.segments-table thead th {
    background: #232b36;
    color: #aeb8c7;

    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;

    padding: 14px 12px;
    text-align: left;
    white-space: nowrap;

    border-bottom: 1px solid #2f3948;
}


/* rows */

.segments-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: 0.2s;
}

.segments-table tbody tr:hover {
    background: rgba(255,255,255,0.015);
}


/* cells */

.segments-table td {
    padding: 14px 12px;
    vertical-align: middle;
    white-space: nowrap;
    color: #c8d0da;
}


/* first column stronger */

.segments-table td:first-child {
    font-weight: 600;
    color: #e5ebf3;
}


/* numbers aligned right */

.segments-table td:not(:first-child) {
    text-align: right;
}


/* remove last border */

.segments-table tbody tr:last-child {
    border-bottom: none;
}

/* =========================================
   BREAKPOINTS CONFIG
========================================= */

.breakpoint-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.breakpoint-label,
.breakpoint-km {
    margin: 0;
}

.remove-breakpoint {
    padding: 10px 14px;
}

/* =========================================
   KPI
========================================= */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(140px,1fr)
    );
    gap: 12px;
}

.kpi-card {
    background: rgba(255,255,255,0.03);

    border: 1px solid rgba(
        255,
        255,
        255,
        0.08
    );

    border-radius: 14px;

    padding: 10px;

    min-height: 20px;
}

.kpi-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 100%;
}

.kpi-left {
    flex: 1;
}

.kpi-right {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-big-icon {
    width: 64px;
    height: 64px;
    opacity: 1;
}

.kpi-label {
    font-size: 15px;
    color: #cdd4df;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 20px;
    line-height: 1.1;
    font-weight: 700;
 
    color: #fff;
}

.kpi-subtitle {
    margin-top: 5px;
    color: #7b8492;
    font-size: 15px;
}

.kpi-time .kpi-big-icon {
    color: #8b5cf6;
}

.kpi-readiness .kpi-big-icon {
    color: #22c55e;
}

.kpi-speed .kpi-big-icon {
    color: #3b82f6;
}

/* =========================================
   ALERTE
========================================= */

.error-box {
    background: #ffe8e8;
    border: 1px solid #d9534f;
    color: #8a1f1f;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ==========================================================
   KPI COVERAGE
========================================================== */

.kpi-coverage{

    position:relative;

}

.coverage-tooltip{
    display:none;
    position:absolute;
    top:100%;
    left:10px;
    margin-top:8px;
    width:280px;
    background:#252c35;
    border:1px solid #3b4653;
    border-radius:10px;
    padding:10px 12px;
    color:#d8dee8;
    font-size:12px;
    line-height:1.4;
    z-index:5000;
    box-shadow:0 8px 18px rgba(0,0,0,.35);
}

.kpi-coverage:hover .coverage-tooltip{
    display:block;
}

.coverage-tooltip strong{
    display:block;
    margin-bottom:6px;
    color:#ffffff;
    font-size:13px;
    font-weight:600;
}

.coverage-tooltip ul{
    margin:6px 0 0;
    padding-left:16px;
}

.coverage-tooltip li{
    margin-bottom:4px;
    font-size:12px;
    font-weight:400;
    line-height:1.35;
}