:root {
    color-scheme: dark;
    font-family: system-ui, sans-serif;
    background: #0b111c;
    color: #dfe9f5;
}

* { box-sizing: border-box; }
body { margin: 0; }

main {
    max-width: 1500px;
    margin: auto;
    padding: 24px;
}

header, .actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

header { justify-content: space-between; }

section, aside {
    background: #131e2e;
    border: 1px solid #2c4058;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

small { color: #55d8ca; }
p { color: #b0c1d6; }
a { color: #50e1d2; }
label { display: block; }

input, textarea, select, button {
    font: inherit;
    border: 1px solid #344860;
    border-radius: 7px;
    padding: 10px;
    background: #0c1523;
    color: inherit;
}

input, textarea {
    display: block;
    max-width: 100%;
    margin: 8px 0;
}

textarea { width: 100%; }
button { cursor: pointer; }

button:disabled {
    opacity: .45;
    cursor: default;
}

.primary {
    background: #39c9b4;
    color: #061614;
    font-weight: 700;
}

.table { overflow: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #2c4058;
    vertical-align: top;
    overflow-wrap: anywhere;
}

td a { word-break: break-word; }
details { max-width: 500px; }

summary {
    cursor: pointer;
    color: #55d8ca;
}

nav { margin: 18px 0; }

nav a {
    padding: 8px 12px;
    border: 1px solid #344860;
    border-radius: 6px;
}

[hidden] { display: none !important; }

body.signed-in { padding-left: 248px; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    border-radius: 0;
    margin: 0;
    padding: 24px 18px;
    background: #0d1726;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid #2c4058;
}

.sidebar .brand {
    font-size: 23px;
    font-weight: 800;
    text-decoration: none;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    display: block;
    text-decoration: none;
    font-size: 14px;
}

.sidebar nav a[aria-current="page"] {
    background: #173e42;
    border-color: #39c9b4;
    color: #68f4df;
}

.nav-group {
    margin-top: 16px;
    color: #95abc5;
    font-size: 12px;
    text-transform: uppercase;
}

.sidebar form { margin-top: 24px; }

.login-panel {
    max-width: 500px;
    margin: 40px auto;
}

#user-form { max-width: 520px; }

#user-form input, #user-form select {
    width: 100%;
}

@media (max-width: 650px) {
    main { padding: 12px; }
    section { padding: 12px; }

    td, th {
        min-width: 130px;
        padding: 9px;
    }

    h1 { font-size: 26px; }
    .actions label { width: 100%; }
}

@media (max-width: 760px) {
    body.signed-in { padding-left: 0; }

    .sidebar {
        position: static;
        width: 100%;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid #2c4058;
    }

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

    .sidebar .nav-group { grid-column: 1 / -1; }
    .sidebar p { margin: 8px 0; }
    .sidebar form { margin-top: 12px; }
}