:root {
    font-family: "Barlow", sans-serif;
    color: #17323a;
    background: #f4f8f8;
}

body {
    margin: 0;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 6vw;
    background: #063f49;
    color: white;
}

.topbar a {
    color: white;
    text-decoration: none;
}

.tma-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tma-tabs a {
    padding: .65rem 1rem;
    border-radius: .5rem;
    border-bottom: 3px solid transparent;
}

.tma-tabs a:hover {
    background: #ffffff18;
}

.tma-tabs a[aria-current="page"] {
    background: #ffffff18;
    border-bottom-color: #6de0cf;
    font-weight: 700;
}

a:focus-visible, button:focus-visible {
    outline: 3px solid #eaa444;
    outline-offset: 3px;
}

.brand {
    font-weight: 700;
    letter-spacing: .04em;
}

.logout {
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
    font: inherit;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 6vw;
}

.eyebrow {
    color: #007f92;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.card {
    display: block;
    padding: 1.5rem;
    border: 1px solid #d6e4e5;
    border-radius: 1rem;
    background: white;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 .5rem 1.5rem #063f4912;
}

.card:hover {
    border-color: #007f92;
    transform: translateY(-2px);
}

.card h2 {
    margin: 0 0 .5rem;
}

.muted {
    color: #60777c;
}

.login {
    max-width: 420px;
    margin: 6rem auto;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
}

.field {
    margin: 1rem 0;
}

label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 600;
}

input {
    box-sizing: border-box;
    width: 100%;
    padding: .75rem;
    border: 1px solid #b8cbcd;
    border-radius: .5rem;
    font: inherit;
}

button, .button {
    display: inline-block;
    padding: .7rem 1rem;
    border: 0;
    border-radius: .5rem;
    background: #007f92;
    color: white;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.graph {
    overflow-x: auto;
    margin-top: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 1rem;
}

.graph-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 1rem;
}

.graph-controls select {
    padding: .75rem;
    border: 1px solid #b8cbcd;
    border-radius: .5rem;
    background: white;
    font: inherit;
}

.graph-controls input {
    max-width: 10rem;
}

.backlog-kpi {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    max-width: 300px;
    margin: 1.5rem 0;
    padding: 1.5rem 2rem;
    border: 1px solid #b8dce1;
    border-radius: .8rem;
    background: #edf8f9;
}

.backlog-responsibility-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.backlog-responsibility-kpis .kpi-value {
    font-size: 2.5rem;
}

.compliance-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.compliance-kpi {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: 1.5rem;
    border: 1px solid #b8dce1;
    border-radius: .8rem;
    background: #edf8f9;
}

.kpi-label {
    color: #063f49;
    font-weight: 600;
}

.kpi-value {
    color: #007f92;
    font-size: 3.5rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.kpi-caption {
    color: #60777c;
}

.backlog-breakdowns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.backlog-breakdown {
    min-width: 0;
}

.backlog-breakdown h3 {
    margin-bottom: 0;
}

.table-scroll {
    overflow-x: auto;
}

.stale-issues-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stale-issues-card {
    min-width: 0;
    margin-top: 0;
    overflow: visible;
}

.stale-issues-scroll {
    max-height: 29rem;
    overflow: auto;
}

.stale-issues-scroll .sla-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.sla-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.sla-table caption {
    text-align: left;
    padding-bottom: 1rem;
    color: #60777c;
}

.sla-table th, .sla-table td {
    padding: .85rem .65rem;
    border-bottom: 1px solid #d6e4e5;
    vertical-align: top;
}

.sla-table th {
    background: #edf8f9;
    white-space: nowrap;
}

.sla-table td a {
    color: #007f92;
    font-weight: 600;
}

.issue-title {
    display: block;
    margin-top: .25rem;
    min-width: 12rem;
}

.sla-alert {
    background: #fff9ed;
}

.sla-breached {
    background: #fff0ef;
}

.sla-badge {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: .3rem;
    white-space: nowrap;
    font-weight: 600;
}

.sla-alert .sla-badge {
    color: #79520a;
    background: #ffebbb;
}

.sla-breached .sla-badge {
    color: #a52d25;
    background: #ffd9d5;
}

@media (max-width: 760px) {
    .backlog-breakdowns {
        grid-template-columns: 1fr;
    }

    .tma-tabs {
        order: 3;
        width: 100%;
    }
}

.tma_info_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
