:root {
    --black: #070707;
    --panel: #111111;
    --panel-soft: #191919;
    --line: #2a2a2a;
    --text: #f7f7f7;
    --muted: #b8b8b8;
    --yellow: #ffcf18;
    --yellow-dark: #d9a900;
    --red: #df0808;
    --green: #1fa76a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0b0b0b;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: var(--yellow);
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: var(--black);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    min-height: 76px;
    padding: 14px 28px;
}

.brand img {
    display: block;
    height: 42px;
    max-width: 210px;
    object-fit: contain;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.shell {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px;
}

.hero {
    align-items: center;
    background: linear-gradient(135deg, #171717, #101010);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 30px;
}

.hero h1,
.panel h1,
.panel h2 {
    margin: 0 0 10px;
}

.hero p {
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    color: var(--yellow) !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 8px !important;
    text-transform: uppercase;
}

.hero-actions,
.section-title,
.inline-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.narrow {
    max-width: 460px;
    width: 100%;
}

.wide {
    max-width: 880px;
}

.login,
.install {
    display: grid;
    min-height: calc(100vh - 132px);
    place-items: center;
}

.login-logo,
.install-logo {
    display: block;
    margin-bottom: 18px;
    max-width: 260px;
    width: 100%;
}

.grid {
    display: grid;
    gap: 22px;
}

.grid.two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
}

.stats {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    margin-top: 22px;
}

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stat span {
    color: var(--yellow);
    display: block;
    font-size: 30px;
    font-weight: 900;
}

.stat p {
    color: var(--muted);
    margin: 6px 0 0;
}

.form {
    display: grid;
    gap: 14px;
}

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

.full {
    grid-column: 1 / -1;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
}

input,
select,
textarea {
    background: #070707;
    border: 1px solid #333;
    border-radius: 7px;
    color: var(--text);
    font: inherit;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

textarea {
    resize: vertical;
}

.button,
button {
    align-items: center;
    background: #222;
    border: 1px solid #3a3a3a;
    border-radius: 7px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
}

.button.primary,
button.primary {
    background: var(--yellow);
    border-color: var(--yellow-dark);
    color: #090909;
}

.button.danger,
button.danger {
    background: var(--red);
    border-color: #a90000;
    color: #fff;
}

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

table {
    border-collapse: collapse;
    min-width: 720px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

td small {
    color: var(--muted);
    display: block;
    margin-top: 4px;
}

.badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 9px;
    white-space: nowrap;
}

.badge-green {
    background: rgba(31, 167, 106, 0.18);
    color: #62e1aa;
}

.badge-yellow {
    background: rgba(255, 207, 24, 0.16);
    color: var(--yellow);
}

.badge-red {
    background: rgba(223, 8, 8, 0.18);
    color: #ff8a8a;
}

.badge-blue {
    background: rgba(64, 145, 255, 0.18);
    color: #9fc8ff;
}

.badge-gray {
    background: rgba(255, 255, 255, 0.12);
    color: #dfdfdf;
}

.alert,
.flash {
    background: rgba(223, 8, 8, 0.14);
    border: 1px solid rgba(223, 8, 8, 0.42);
    border-radius: 8px;
    color: #ffdada;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.flash,
.success {
    background: rgba(31, 167, 106, 0.14);
    border-color: rgba(31, 167, 106, 0.42);
    color: #c9f8e4;
}

.inline-note {
    margin: 0 0 12px;
}

.single {
    margin-top: 16px;
}

.task-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.task-head h1 {
    margin: 0 0 6px;
}

.task-head p,
.muted {
    color: var(--muted);
    margin: 0;
}

.details {
    display: grid;
    gap: 10px;
    grid-template-columns: 150px 1fr;
}

.details dt {
    color: var(--muted);
    font-weight: 800;
}

.details dd {
    margin: 0;
}

.comments {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.comment {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.comment span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 3px;
}

.comment p {
    margin: 10px 0 0;
}

.check-row {
    align-items: center;
    color: var(--text);
    display: grid;
    font-size: 14px;
    gap: 10px;
    grid-template-columns: 22px minmax(0, 1fr);
    justify-content: start;
}

.check-row input[type="checkbox"] {
    height: 18px !important;
    margin: 0;
    min-height: 18px !important;
    padding: 0;
    width: 18px !important;
}

.compact-form {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
}

.actions-cell {
    display: grid;
    gap: 8px;
    min-width: 240px;
}

.compact-table {
    min-width: 560px;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 860px) {
    .topbar,
    .hero,
    .task-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid.two,
    .grid-form,
    .stats {
        grid-template-columns: 1fr;
    }

    .compact-form {
        grid-template-columns: 1fr;
    }

    .shell {
        padding: 18px;
    }
}
