@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/static/fonts/inter.woff2") format("woff2");
}

:root {
    --font: "Inter", sans-serif;
    --background: #080808;
    --surface: #212121;
    --border: #f2f2f2;
    --grid: #1f1f1f;
    --text: #f2f2f2;
    --text-muted: #a3a3a3;
    --accent: #4c45d3;
    --text-small: 0.75rem;
    --text-normal: 1rem;
    --text-big: 1.5rem;
    --text-title: 2.5rem;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--surface);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--surface);
}

*::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 5px;
    border: 2px solid var(--surface);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--text);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--background);
    color: var(--text);
}

a {
    color: var(--text);
}

.section-title {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.5rem;
    margin-top: 0;
}
.section-subtitle {
    font-size: var(--text-normal);
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 0;
}

.muted {
    color: var(--text-muted);
}

/* Shared table style: apply class="table" to any <table>. */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-normal);
}
.table thead th {
    text-align: center;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.table tbody tr:hover {
    background: var(--surface);
}
.table tbody td {
    padding: 0.6rem 0.75rem;
    color: var(--text);
    border-bottom: none;
    text-align: center;
}
.table tbody td:not(:first-child) {
    color: var(--text-muted);
}
/* App IDs (and their column headers) read better left-aligned. */
.table thead th.col-app,
.table tbody td:has(.repo-link) {
    text-align: left;
}

/* Shared status color utilities. */
.text-bad {
    color: #f87171;
    font-weight: 600;
}
.text-good {
    color: #34d399;
    font-weight: 600;
}

/* Shared small uppercase label, e.g. above a panel or form field. */
.repo-panel-title {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: var(--text-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Shared button style: apply class="app-runs-btn" to any button/link,
   plus "app-runs-btn-enable" or "app-runs-btn-disable" for the green/red variants. */
.app-runs-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--text);
    color: var(--surface);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-size: var(--text-normal);
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}
.app-runs-btn:hover {
    opacity: 0.9;
}
.app-runs-btn-enable {
    background: #34d399;
    color: var(--background);
}
.app-runs-btn-disable {
    background: #f87171;
    color: var(--background);
}
.app-runs-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Inline spinner for buttons: add <span class="btn-spinner"></span> inside a
   button, it grows/spins automatically while htmx has a request in flight. */
.btn-spinner {
    display: inline-block;
    box-sizing: border-box;
    width: 0;
    height: 0.7rem;
    margin-right: 0;
    vertical-align: -1px;
    border: 0 solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0;
    overflow: hidden;
    transition:
        width 0.15s ease,
        margin-right 0.15s ease,
        opacity 0.15s ease,
        border-width 0.15s ease;
}
.htmx-request .btn-spinner,
.app-runs-btn[disabled] .btn-spinner {
    width: 0.7rem;
    margin-right: 0.4rem;
    border-width: 2px;
    opacity: 1;
    animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}
