﻿/* Set padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}
* Dashboard polish */
.dashboard {
    max-width: 1200px;
    margin: 20px auto;
}

.kpis {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.kpi {
    flex: 1 1 240px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

    .kpi .label {
        color: #6b7280;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    .kpi .value {
        font-size: 28px;
        font-weight: 700;
        margin-top: 4px;
    }

    .kpi .sub {
        color: #6b7280;
        font-size: 12px;
    }

.card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    margin-bottom: 16px;
}

    .card h4 {
        margin-top: 0;
        font-size: 16px;
        font-weight: 600;
    }

.btn-chip {
    border-radius: 999px;
    padding: 6px 12px;
    margin-right: 6px;
}

    .btn-chip.active {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
    }

.table-tiny td, .table-tiny th {
    padding: 6px 8px;
}

.text-right {
    text-align: right;
}

.text-muted-2 {
    color: #6b7280;
}
.kpi-card {
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(16,24,40,.06);
}

.kpi-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef2ff;
}

.kpi-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
}

.kpi-sub {
    font-size: 12px;
    color: #6b7280;
}
/* KPI färger */
.kpi-pos {
    color: #15803d;
}
/* grön (>= 0) */
.kpi-neg {
    color: #dc2626;
}
/* röd */

/* Toggle-knappar */
.btn-toggle {
    border-radius: 9999px;
    padding: .35rem .9rem;
    border: 1px solid rgba(0,0,0,.15);
    background: #fff;
    transition: box-shadow .15s ease, background .15s ease;
}

    .btn-toggle.active {
        background: #f3f4f6;
        box-shadow: 0 1px 2px rgba(0,0,0,.08) inset;
    }

/* Chart container */
.chart-card {
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    padding: 12px 12px 4px 12px;
    background: #fff;
}

/* Card look already from Bootstrap; ensure consistent rounding/shadow */
.card {
    border: 0;
}

    .card.shadow-sm {
        box-shadow: 0 6px 18px rgba(0,0,0,.06) !important;
    }

.rounded-3 {
    border-radius: 1rem !important;
}

/* Ensure KPI percent stays small even when colored */
.small.text-success, .small.text-danger {
    font-weight: 500;
}

/* Optional tighter canvas padding */
.chart-wrap {
    height: 340px;
    position: relative;
    overflow: visible;
}
.chart-wrap canvas {
    position: relative;
    z-index: 1;
}
/* under */

.card.shadow-sm {
    box-shadow: 0 6px 18px rgba(0,0,0,.06) !important;
}

.rounded-3 {
    border-radius: 1rem !important;
}

.small.text-success, .small.text-danger {
    font-weight: 500;
}

.fi {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.chart-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    border-radius: 10px;
    padding: .6rem .7rem;
    min-width: 160px;
    font-size: .85rem;
}

    .chart-tooltip .tt-date {
        color: #6b7280;
        margin-bottom: .35rem
    }

    .chart-tooltip .tt-row {
        display: flex;
        align-items: center;
        gap: .5rem;
        margin: .18rem 0
    }

    .chart-tooltip .tt-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%
    }

    .chart-tooltip .tt-name {
        flex: 1
    }

    .chart-tooltip .tt-val {
        font-weight: 600
    }