﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
    /* A flex item won't shrink below its content's width by default, so one wide table would
       stretch the whole page past the app frame. With 0, wide tables scroll inside their
       table-responsive wrapper instead. */
    min-width: 0;
}

    .main .top-row {
        background-color: #f7f7f7;
        border-bottom: 1px solid #d6d5d5;
        justify-content: flex-end;
    }

        .main .top-row > a, .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

.main .top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

    .sidebar .top-row {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

    .sidebar .nav-item {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }

        .sidebar .nav-item:first-of-type {
            padding-top: 1rem;
        }

        .sidebar .nav-item:last-of-type {
            padding-bottom: 1rem;
        }

        .sidebar .nav-item a {
            color: #d7d7d7;
            border-radius: 4px;
            height: 3rem;
            display: flex;
            align-items: center;
            line-height: 3rem;
        }

            .sidebar .nav-item a.active {
                background-color: rgba(255,255,255,0.25);
                color: white;
            }

            .sidebar .nav-item a:hover {
                background-color: rgba(255,255,255,0.1);
                color: white;
            }

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
    font-size: .8125rem;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}


.table-fixed tbody {
    height: 200px;
    overflow-y: auto;
    width: 100%;
}

.table-fixed thead,
.table-fixed tbody,
.table-fixed tr,
.table-fixed td,
.table-fixed th {
    display: block;
}

.table-fixed tr:after {
    content: "";
    display: block;
    visibility: hidden;
    clear: both;
}

.table-fixed tbody td,
.table-fixed thead > tr > th {
    float: left;
}

.nav-link.active[role=tab] {
    font-weight: bold;
}

#midas-intro {
    color: #fff;
    font: 70px/1 'TeXGyreAdventorBold';
    text-transform: none;
    text-align: center;
}

label.bold {
    font-weight: bold;
}

.to-bill {
    color: darkorange;
}

.billed {
    color: green;
}


th {
    font-size: small;
    font-weight: bold;
}

.btn-group-xs > .btn, .btn-xs {
    padding: .25rem .4rem;
    font-size: .875rem;
    line-height: .5;
    border-radius: .2rem;
}


/* ---- Page structure (PageHeader, SectionCard) ---- */

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #dee2e6;
}

.page-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .625rem;
    margin-top: .375rem;
    font-size: .875rem;
    color: #6c757d;
}

    .page-meta strong {
        color: #212529;
        font-weight: 600;
    }

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.page-actions-divider {
    width: 1px;
    height: 1.75rem;
    margin: 0 .25rem;
    background: #dee2e6;
}

.section-card {
    margin-bottom: 1.25rem;
}

.section-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background: #f8f9fa;
}

.section-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.section-card-note {
    font-size: .8125rem;
    color: #6c757d;
}

.empty-state {
    padding: 1.75rem 1rem;
    text-align: center;
    font-size: .875rem;
    color: #6c757d;
}


/* ---- Data tables ---- */

.table-data {
    margin-bottom: 0;
    font-size: .875rem;
}

    .table-data th,
    .table-data td {
        padding: .75rem;
        vertical-align: middle;
    }

        .table-data th:first-child,
        .table-data td:first-child {
            padding-left: 1rem;
        }

        .table-data th:last-child,
        .table-data td:last-child {
            padding-right: 1rem;
        }

    .table-data thead th {
        border-top: 0;
        border-bottom: 1px solid #dee2e6;
        font-size: .75rem;
        font-weight: 600;
        letter-spacing: .04em;
        text-transform: uppercase;
        white-space: nowrap;
        color: #6c757d;
    }

    .table-data tfoot th,
    .table-data tfoot td {
        border-top: 2px solid #dee2e6;
        background: #f8f9fa;
        font-weight: 700;
    }

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cell-secondary {
    display: block;
    font-size: .8125rem;
    color: #6c757d;
}

.actions-column {
    width: 1%;
}

.row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .375rem;
    min-width: 11rem;
}

.charge-column {
    width: 8.5rem;
}

.ungrouped-row {
    background: #fdf6f7;
}


/* ---- Status pills and chips ---- */

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .1875rem .625rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

    .status-pill .oi {
        top: 0;
        font-size: .6875rem;
    }

a.status-pill:hover {
    text-decoration: none;
    filter: brightness(.95);
}

.status-pill-to-do {
    background: #fff3cd;
    color: #856404;
}

.status-pill-done {
    background: #d4edda;
    color: #155724;
}

.status-pill-pending {
    border: 1px dashed #b38600;
    background: #fff;
    color: #856404;
}

.status-pill-danger {
    background: #f8d7da;
    color: #721c24;
}

.status-pill-info {
    background: #cce5ff;
    color: #004085;
}

.status-pill-neutral {
    background: #e2e3e5;
    color: #383d41;
}

.chip {
    display: inline-block;
    padding: .125rem .5rem;
    margin: 0 .25rem .25rem 0;
    border-radius: .25rem;
    background: #e9ecef;
    color: #495057;
    font-size: .75rem;
}

.charge-none {
    color: #6c757d;
}
