body {
    min-height: 100dvh;

    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
}

.backoffice-page {
    background: rgb(27 33 50);
    color: #fff;
}

.content.backoffice-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgb(27 33 50);
    color: #fff;
}

.backoffice {
    flex: 1;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    background: #11182b;
}

.backoffice {
    display: grid;
    grid-template-columns:
        210px minmax(0, 1fr);

    width: 100%;
    min-height: 750px;
    background: #11182b;
}

.content .backoffice {
    display: grid;
    grid-template-columns:
        210px minmax(0, 1fr);
    width: 100%;
    background: #11182b;
}

.content .bo-sidebar {
    min-width: 0;
    background: #0d1528;
    border-right: 1px solid #303752;
    padding: 25px 14px;
}

.content .bo-main {
    display: block;
    min-width: 0;
    padding: 30px;
}

.bo-sidebar {
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(
            180deg,
            #0d1528 0%,
            #09101e 100%
        );

    border-right: 1px solid #303752;
    padding: 25px 14px;
}

.bo-sidebar-header {
    padding: 0 10px 20px;
}

.bo-sidebar-header h2 {
    margin: 0;

    font-family: Georgia, serif;

    font-size: 28px;
    font-weight: normal;
}

.bo-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bo-nav-item {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 14px;
    border-radius: 8px;
    color: #b9bfd2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition:
        background-color .15s ease,
        color .15s ease,
        transform .15s ease;
}

.bo-nav-icon {
    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.bo-nav-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition:
        stroke .15s ease,
        transform .15s ease;
}

.bo-nav-item:hover {
    color: #ffffff;
    background: rgba(126, 87, 194, .12);
}

.bo-nav-item:hover .bo-nav-icon svg {
    transform: scale(1.05);
}

.bo-nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, #101e42 0%, #121e44 100%);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 4%), 0 4px 14px rgb(10 4 4 / 11%);
}

.bo-nav-item.active .bo-nav-icon {
    color: #ffffff;
}

@media (max-width: 800px) {

    .bo-nav-item {
        justify-content: center;
        padding: 0;
    }

    .bo-nav-item > span:not(.bo-nav-icon) {
        display: none;
    }

    .bo-nav-icon {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .bo-nav-icon svg {
        width: 22px;
        height: 22px;
    }

}

.bo-sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 18px 12px;
    border-top: 1px solid #303752;
}


.bo-sidebar-footer small {
    color: #8e97af;
}

.bo-main {
    min-width: 0;
    padding: 30px;
}


.bo-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 25px;
}


.bo-page-header h1 {
    margin: 0 0 6px;
    font-family: Georgia, serif;
    font-size: 38px;
    font-weight: normal;
}

.bo-page-header p {
    margin: 0;
    color: #b7bdcd;
}


.bo-period {
    background: #161c31;
    color: #fff;
    border: 1px solid #414967;
    border-radius: 7px;
    padding: 11px 15px;
}


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

.bo-kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;

    margin-bottom: 15px;
}


.bo-kpi-card {
    min-height: 115px;
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 18px;
    /* border: 1px solid #363e5c; */
    border-radius: 10px;
    background: linear-gradient(135deg, #12182b, #1e215d);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 4%), 0 4px 14px rgb(10 4 4 / 11%);
}


.bo-kpi-icon {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    font-size: 24px;
}

.bo-kpi-icon svg {
    width: 27px;
    height: 27px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.bo-kpi-icon.purple {
    background: #4e2d8a;
}


.bo-kpi-icon.blue {
    background: #263b8b;
}


.bo-kpi-icon.orange {
    background: #493822;

    color: #ffb932;

    border: 1px solid #765725;
}


.bo-kpi-icon.pink {
    background: #552655;
}


.bo-kpi-content {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


.bo-kpi-content > span {
    color: #bec3d3;

    font-size: 13px;

    margin-bottom: 5px;
}


.bo-kpi-content strong {
    font-family: Georgia, serif;

    font-size: 27px;

    font-weight: normal;
}


.bo-kpi-content small {
    margin-top: 8px;

    font-size: 11px;
}


.bo-kpi-content small span {
    color: #8e97ae;

    margin-left: 5px;
}


.positive {
    color: #43df75;
}

.bo-kpi-content a {
    margin-top: 8px;

    color: #a987ff;

    text-decoration: none;

    font-size: 12px;
}


/* ==========================================
   DASHBOARD GRID
   ========================================== */

.bo-dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(220px, .8fr)
        minmax(220px, .8fr);

    gap: 15px;

    margin-bottom: 15px;
}


.bo-panel {
    min-width: 0;
    padding: 16px;
    border-radius: 10px;
    background: linear-gradient(145deg, #191f36, #151b30);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 4%), 0 4px 14px rgb(10 4 4 / 11%);
}


.bo-panel-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}


.bo-panel-header h2 {
    margin: 0;

    font-family: Georgia, serif;

    font-size: 19px;

    font-weight: normal;
}


.bo-panel-header a {
    color: #aa8bff;

    text-decoration: none;

    font-size: 11px;
}


/* ==========================================
   STATUS
   ========================================== */

.bo-status-list {
    display: flex;
    flex-direction: column;
}


.bo-status-row {
    min-height: 40px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    border-bottom: 1px solid #2c334c;

    font-size: 12px;
}


.bo-status-row:last-child {
    border-bottom: none;
}


.bo-status-row span {
    display: flex;

    align-items: center;

    gap: 9px;
}


.dot {
    display: inline-block;

    width: 11px;
    height: 11px;

    border-radius: 50%;
}


.dot.yellow {
    background: #ffbd3f;
}


.dot.green {
    background: #42df74;
}


.dot.red {
    background: #ff5967;
}


.dot.blue-dot {
    background: #3eb9ee;
}


.dot.purple-dot {
    background: #a07aef;
}



/* ==========================================
   BOTTOM
   ========================================== */

.bo-bottom-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;
}


.bo-table-wrapper {
    overflow-x: auto;

    background: #0d0f17;

    border-radius: 7px;
}


.bo-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 11px;
}


.bo-table thead {
    background:
        linear-gradient(
            90deg,
            #50318b,
            #6541a8
        );
}


.bo-table th {
    padding: 10px 12px;
    text-align: left;
    text-transform: uppercase;
    color: #fff;
    font-size: 9px;
}


.bo-table td {
    padding: 10px 12px;
    color: #fff;
    border-bottom: 1px solid #292c38;
}


.bo-table tbody tr:hover {
    background: #151822;
}


/* ==========================================
   BADGES
   ========================================== */

.bo-badge {
    display: inline-flex;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 10px;
}


.bo-badge.paid {
    background: #0c5729;

    color: #a2f7bc;

    border: 1px solid #159743;
}


.bo-badge.private {
    background: #482079;

    color: #e0cbff;
}


/* ==========================================
   CUSTOMER
   ========================================== */

.bo-customer {
    display: flex;

    align-items: center;

    gap: 8px;
}


.bo-avatar {
    width: 29px;
    height: 29px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #c9b8ff;

    color: #281a4b;

    font-weight: bold;
}


/* ==========================================
   ARROW
   ========================================== */

.bo-arrow {
    width: 25px;
    height: 25px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    background: #7151ec;

    color: white;

    border-radius: 5px;

    text-decoration: none;
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1200px) {

    .bo-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .bo-dashboard-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .bo-chart-panel {
        grid-column: 1 / -1;
    }

}


@media (max-width: 800px) {

    .content .backoffice, .backoffice {
        grid-template-columns:
            65px minmax(0, 1fr);
    }

    .bo-sidebar-header {
        display: none;
    }


    .bo-nav-item {
        justify-content: center;

        padding: 0;
    }


    .bo-nav-item span:last-child {
        display: none;
    }


    .bo-sidebar-footer {
        display: none;
    }


    .bo-main {
        padding: 18px;
    }


    .bo-bottom-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   PRODUCTS TABLE
   Samma tema som dashboardens övriga tabeller
   ========================================================= */

.products-table-container {
    width: 100%;
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #191f36,
            #151b30
        );

    border: 1px solid #363e5c;
    border-radius: 10px;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.products-table-toolbar {
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 12px 16px;

    border-bottom: 1px solid #363e5c;
}


/* Sökfält */

#product-search {
    width: 100%;
    max-width: 340px;

    padding: 11px 14px;

    background: #101526;

    border: 1px solid #3c4464;
    border-radius: 7px;

    color: #fff;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}


#product-search::placeholder {
    color: #7f879e;
}


#product-search:hover {
    border-color: #554b7d;
}


#product-search:focus {
    background: #12182a;

    border-color: #805ed8;

    box-shadow:
        0 0 0 3px rgba(128, 94, 216, .12);
}


/* Antal produkter */

#product-count {
    color: #929ab0;

    font-size: 12px;

    white-space: nowrap;
}


/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.products-table-container .table-wrapper {
    width: 100%;

    overflow-x: auto;
}


/* =========================================================
   TABLE
   ========================================================= */

#products-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 12px;
}


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

#products-table thead {
    background:
        linear-gradient(
            90deg,
            #51338b 0%,
            #6541a8 100%
        );
}


#products-table th {
    position: relative;

    padding: 12px 14px;

    color: #ffffff;

    text-align: left;

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: .04em;

    white-space: nowrap;

    border: 0;

    user-select: none;
}


/*
 * Alla TH med data-sort är klickbara.
 */

#products-table th[data-sort] {
    cursor: pointer;

    padding-right: 28px;

    transition: background .15s ease;
}


#products-table th[data-sort]:hover {
    background: rgba(255, 255, 255, .08);
}


/* =========================================================
   SORTERINGSPIL
   ========================================================= */

#products-table th[data-sort]::after {
    content: "↕";

    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    color: rgba(255, 255, 255, .45);

    font-size: 11px;
}


#products-table th.sort-asc::after {
    content: "↑";

    color: #fff;
}


#products-table th.sort-desc::after {
    content: "↓";

    color: #fff;
}


/* =========================================================
   TABLE BODY
   ========================================================= */

#products-table tbody {
    background: #0e111b;
}


#products-table td {
    padding: 12px 14px;

    color: #dfe2ec;

    border-bottom: 1px solid #292e3e;

    vertical-align: middle;
}


#products-table tbody tr:last-child td {
    border-bottom: 0;
}


/* Zebra – väldigt subtil */

#products-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, .015);
}


/* Hover */

#products-table tbody tr {
    transition:
        background .12s ease,
        box-shadow .12s ease;
}


#products-table tbody tr:hover {
    background: #181b29;

    box-shadow:
        inset 3px 0 0 #7955d7;
}


/* =========================================================
   PRODUKTNAMN
   ========================================================= */

#products-table td strong {
    display: block;

    color: #ffffff;

    font-size: 12px;
    font-weight: 500;

    margin-bottom: 3px;
}


#products-table td small {
    display: block;

    color: #858da3;

    font-size: 10px;
}


/* =========================================================
   STATUS
   ========================================================= */

.product-status {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 500;

    white-space: nowrap;
}


/* Aktiv */

.product-status.active {
    background: rgba(40, 167, 85, .14);

    border: 1px solid rgba(56, 210, 108, .35);

    color: #65e890;
}


.product-status.active::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #45dc78;
}


/* Utgången */

.product-status.deprecated {
    background: rgba(255, 89, 103, .12);

    border: 1px solid rgba(255, 89, 103, .30);

    color: #ff8791;
}


.product-status.deprecated::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #ff5967;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

.products-table-container .table-wrapper::-webkit-scrollbar {
    height: 8px;
}


.products-table-container .table-wrapper::-webkit-scrollbar-track {
    background: #101421;
}


.products-table-container .table-wrapper::-webkit-scrollbar-thumb {
    background: #3d4563;

    border-radius: 10px;
}


.products-table-container .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #5a477f;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .products-table-toolbar {
        align-items: stretch;
        flex-direction: column;

        gap: 8px;
    }


    #product-search {
        max-width: none;
    }


    #products-table {
        min-width: 900px;
    }

}

.products-page-actions {
    display: flex;
    justify-content: flex-end;

    margin-bottom: 15px;
}


.bo-primary-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 0 15px;

    background:
        linear-gradient(
            135deg,
            #8059df,
            #6541bd
        );

    border: 1px solid #8e6ce4;
    border-radius: 7px;

    color: #fff;

    text-decoration: none;

    font-size: 12px;
    font-weight: 500;

    box-shadow:
        0 4px 14px rgba(86, 53, 151, .20);

    transition:
        transform .15s ease,
        filter .15s ease;
}


.bo-primary-button:hover {
    filter: brightness(1.08);

    transform: translateY(-1px);
}


.bo-primary-button svg {
    width: 17px;
    height: 17px;

    fill: none;

    stroke: currentColor;
    stroke-width: 2;

    stroke-linecap: round;
}

.bo-chart-container {
    position: relative;
    width: 100%;
}

.bo-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}


/* GRID */

.bo-chart-grid-line {
    stroke: #e5e7eb;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}


/* AXELTEXTER */

.bo-chart-axis-label,
.bo-chart-date {
    fill: #8b8f9a;
    font-size: 11px;
    font-family: inherit;
}


/* STAPLAR */

.bo-chart-bar {
    fill: #8b5cf6;
    opacity: .75;
    cursor: pointer;

    transition:
        opacity .15s ease,
        filter .15s ease;
}

.bo-chart-bar:hover {
    opacity: 1;
    filter: brightness(.95);
}


/* ORDERLINJE */

.bo-chart-order-line {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}


/* ORDERPUNKTER */

.bo-chart-order-point {
    fill: #fff;
    stroke: #fff;
    stroke-width: 3;
    cursor: pointer;

    transition:
        r .15s ease,
        fill .15s ease;
}

.bo-chart-order-point:hover {
    r: 6;
    fill: #2563eb;
}


/* TOOLTIP */

.bo-chart-tooltip {
    position: absolute;

    z-index: 20;

    min-width: 155px;

    padding: 10px 12px;

    background: #111827;
    color: #fff;

    border-radius: 8px;

    font-size: 12px;

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, -110%);

    transition: opacity .1s ease;
}

.bo-chart-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.bo-chart-tooltip strong {
    display: block;
    margin-bottom: 5px;
}

.bo-chart-tooltip span {
    display: block;
    color: #d1d5db;
}

.bo-chart-tooltip b {
    color: #fff;
}


/* LEGEND */

.bo-chart-legend {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 22px;

    margin-top: 12px;

    font-size: 12px;
    color: #6b7280;
}

.bo-chart-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.bo-chart-legend i {
    display: inline-block;
}

.bo-chart-legend .revenue {
    width: 12px;
    height: 12px;

    border-radius: 3px;

    background: #8b5cf6;
}

.bo-chart-legend .orders {
    width: 18px;
    height: 3px;

    border-radius: 3px;

    background: #2563eb;
}


/* EMPTY */

.bo-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: #8b8f9a;
}

.backoffice-breadcrumb > .breadcrumb-list {
    padding: 0px;
    padding-left: 0px;
    margin-left: 0px;
    margin-bottom: 10px;
}