:root {
    color-scheme: dark;
    --bg: #11151b;
    --panel: #1b222b;
    --panel-strong: #202a35;
    --text: #eef4fb;
    --muted: #9eadbc;
    --line: #334151;
    --accent: #d6b35f;
    --accent-ink: #1d1606;
    --danger: #e45f5f;
    --ok: #62ce86;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top left, #27303c 0, #11151b 34rem);
    color: var(--text);
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
}

.top-nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.top-nav a {
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    padding: 9px 12px;
    text-decoration: none;
}

.top-nav a.active,
.top-nav a:hover,
.top-nav a:focus {
    background: var(--panel-strong);
    color: var(--accent);
}

.hero,
.account-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.news-hero {
    min-height: 360px;
    align-items: center;
}

.compact-hero {
    align-items: center;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.brand-logo {
    display: block;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 34px;
}

h2 {
    font-size: 21px;
    margin-bottom: 18px;
}

.lede,
.muted,
.account-header p {
    color: var(--muted);
}

.lede {
    max-width: 720px;
    line-height: 1.55;
    margin: 10px 0 0;
}

.lede a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.lede a:hover,
.lede a:focus {
    text-decoration: underline;
}

.status-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.status.ok {
    color: var(--ok);
}

.status.bad {
    color: var(--danger);
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.client-setup {
    max-width: 760px;
    margin-top: 24px;
    color: #dce5ef;
}

.client-setup p {
    margin: 0 0 8px;
}

.client-setup code {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #0f141a;
    color: var(--accent);
    padding: 7px 9px;
    font-family: Consolas, monospace;
    overflow-wrap: anywhere;
}

.news-copy {
    max-width: 760px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.news-copy h2 {
    margin-bottom: 10px;
    font-size: 26px;
}

.news-copy p:last-child {
    color: #dce5ef;
    line-height: 1.55;
    margin: 0;
}

.news-list {
    display: grid;
    gap: 18px;
}

.news-item {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.news-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.news-item h2 {
    margin-bottom: 8px;
}

.news-item a {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    margin-top: 10px;
    text-decoration: none;
}

.news-item a:hover,
.news-item a:focus {
    text-decoration: underline;
}

.news-meta {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 5px;
}

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

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

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

.panel {
    background: rgba(27, 34, 43, 0.92);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    color: #dce5ef;
    font-size: 14px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #485767;
    border-radius: 6px;
    background: #0f141a;
    color: var(--text);
    padding: 11px 12px;
    font: inherit;
}

textarea {
    min-height: 78px;
    resize: vertical;
    margin-bottom: 14px;
}

button {
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 11px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button.secondary {
    background: #303b48;
    color: var(--text);
}

button.danger {
    background: var(--danger);
    color: #230909;
}

.button-link {
    display: inline-block;
    border-radius: 6px;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 11px 14px;
    font-weight: 700;
    text-decoration: none;
}

.button-link.secondary {
    background: #303b48;
    color: var(--text);
}

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.notice.success {
    background: rgba(98, 206, 134, 0.12);
    border: 1px solid rgba(98, 206, 134, 0.45);
}

.notice.error {
    background: rgba(228, 95, 95, 0.12);
    border: 1px solid rgba(228, 95, 95, 0.45);
}

.secret {
    background: #10151b;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    overflow-wrap: anywhere;
    margin-bottom: 12px;
    font-family: Consolas, monospace;
    color: var(--accent);
}

.qr-wrap {
    width: 190px;
    aspect-ratio: 1;
    background: #fff;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.qr-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.admin-top {
    margin-bottom: 18px;
}

.news-editor {
    margin-bottom: 18px;
}

.admin-menu {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.admin-menu.compact {
    margin-top: -6px;
}

.admin-menu-button {
    display: block;
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(27, 34, 43, 0.92);
    color: var(--text);
    padding: 14px;
    text-decoration: none;
}

.admin-menu-button strong {
    display: block;
    color: var(--accent);
    margin-bottom: 6px;
}

.admin-menu-button span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.admin-menu-button.active,
.admin-menu-button:hover,
.admin-menu-button:focus {
    background: var(--panel-strong);
    border-color: #5b6b7d;
}

.admin-summary,
.account-search,
.gm-notes-table,
.server-grid,
.job-panel {
    margin-bottom: 18px;
}

.filter-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.server-status-object.is-refreshing {
    opacity: 0.88;
}

.server-card-heading,
.server-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.server-card-heading {
    margin-bottom: 12px;
}

.server-card-heading h2 {
    margin-bottom: 0;
}

.server-actions {
    flex-wrap: wrap;
}

.server-actions.stacked {
    align-items: stretch;
    flex-direction: column;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.path-row {
    display: grid;
    gap: 5px;
    margin: 0 0 12px;
}

.path-row span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.path-row code {
    color: var(--accent);
    font-family: Consolas, monospace;
}

.changelog-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.changelog-entry {
    border-top: 1px solid var(--line);
    margin: 0;
    padding-top: 10px;
}

.changelog-entry strong {
    color: var(--accent);
    display: block;
    font-family: Consolas, monospace;
    font-size: 13px;
    margin-bottom: 4px;
}

.changelog-entry span {
    color: #dce5ef;
    display: block;
    line-height: 1.35;
}

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

.build-progress {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 16px;
}

.build-progress h3 {
    font-size: 17px;
    margin: 0;
}

.progress-bar {
    background: #0f141a;
    border: 1px solid var(--line);
    border-radius: 999px;
    height: 12px;
    margin: 0 0 14px;
    overflow: hidden;
}

.progress-bar span {
    background: linear-gradient(90deg, var(--accent), #62ce86);
    display: block;
    height: 100%;
    transition: width 180ms ease;
}

.progress-bar.indeterminate span {
    animation: build-progress-pulse 1.4s ease-in-out infinite;
}

@keyframes build-progress-pulse {
    0% {
        transform: translateX(-70%);
    }

    50% {
        transform: translateX(15%);
    }

    100% {
        transform: translateX(130%);
    }
}

.command-output {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #0f141a;
    color: #dce5ef;
    padding: 12px;
    white-space: pre-wrap;
}

.news-editor textarea {
    min-height: 130px;
}

.news-form {
    margin-bottom: 18px;
}

.news-admin-list {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.news-admin-item {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.news-admin-heading,
.news-admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.news-admin-heading {
    justify-content: space-between;
    margin-bottom: 14px;
}

.news-admin-actions {
    margin-top: 10px;
}

.admin-user-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.admin-user-row {
    display: grid;
    gap: 3px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
}

.checkbox-label input {
    width: auto;
}

.admin-panel {
    padding: 0;
    overflow: hidden;
}

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

.admin-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: var(--panel-strong);
    color: #dce5ef;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.compact-form {
    display: grid;
    gap: 8px;
    min-width: 160px;
}

.compact-form input,
.compact-form select {
    padding: 9px 10px;
}

.block {
    display: block;
    margin-top: 4px;
}

.danger-text {
    color: #ff8a8a;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(15, 20, 26, 0.46);
}

.pagination a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.pagination a:hover,
.pagination a:focus {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .grid.two,
    .grid.three,
    .admin-menu,
    .filter-row {
        grid-template-columns: 1fr;
    }

    .top-nav {
        justify-content: flex-start;
    }

    .hero,
    .account-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .news-hero {
        min-height: 0;
    }
}

@media (max-width: 520px) {
    .hero-brand {
        gap: 10px;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }
}
