/* g8te portal styles: deliberately small, no build step. */
:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #1d2330;
    --muted: #5b6475;
    --border: #dde1e8;
    --accent: #2f5bea;
    --accent-text: #ffffff;
    --radius: 10px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12151b;
        --surface: #1b1f27;
        --text: #e6e9ef;
        --muted: #9aa3b5;
        --border: #2c323d;
        --accent: #6d8dff;
        --accent-text: #0b0e14;
    }
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: .02em; }
.account { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.account form { margin: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; }

.page { max-width: 960px; margin: 2rem auto; padding: 0 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.narrow { max-width: 480px; margin: 3rem auto; }
.center { text-align: center; }
.muted { color: var(--muted); }

.button {
    display: inline-block; padding: .6rem 1.1rem; border-radius: 8px; border: 0;
    background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; cursor: pointer;
}
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.details { overflow: auto; font-size: .8rem; background: var(--bg); padding: 1rem; border-radius: 6px; }

.main-nav { display: flex; align-items: center; gap: 1.1rem; }
.main-nav a:not(.brand) { color: var(--muted); text-decoration: none; }
.main-nav a:not(.brand):hover { color: var(--text); }
h2 { font-size: 1.15rem; margin: 1.25rem 0 .75rem; }
.card > h2:first-child { margin-top: 0; }
.card + .card, .card + .table-wrap, .table-wrap + .card, .space-block + .space-block { margin-top: 1.25rem; }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.danger { color: #c62828 !important; }
code { font-size: .9em; background: var(--bg); padding: .1em .3em; border-radius: 4px; }
input, select { font: inherit; padding: .4rem .55rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.button.small { padding: .35rem .7rem; font-size: .9rem; }
.button.secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.form-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.form-grid label { display: grid; gap: .3rem; font-size: .9rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin: .5rem 0; background: var(--surface); }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.actions form { margin: 0; }
.badge { display: inline-block; font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.badge-active, .badge-online { color: #1b7f3b; border-color: #1b7f3b55; }
.badge-suspended, .badge-retired, .badge-offline { color: #c62828; border-color: #c6282855; }
.badge-pending, .badge-pending_dns { color: #9a6700; border-color: #9a670055; }
.flash, .notice { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid var(--border); background: var(--surface); }
.flash-success { border-color: #1b7f3b66; }
.flash-error { border-color: #c6282866; color: #c62828; }
.flash-secret { border-color: #9a670066; }
.secret { display: block; margin-top: .5rem; padding: .5rem; word-break: break-all; user-select: all; }
.tabs { display: flex; gap: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.tabs a { padding: .5rem 0; text-decoration: none; color: var(--muted); }
.tabs a.active { color: var(--text); border-bottom: 2px solid var(--accent); }
.space-head { display: flex; justify-content: space-between; align-items: baseline; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.tile { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .75rem; border-radius: var(--radius);
        background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); text-align: center; }
.tile:hover { border-color: var(--accent); }
.tile.disabled { opacity: .6; }
.tile-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.tile-letter { display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 1.2rem; }
.tile-name { font-weight: 600; }
.stack { display: grid; gap: .9rem; max-width: 560px; }
.stack label { display: grid; gap: .3rem; font-size: .95rem; }
textarea { font: inherit; padding: .4rem .55rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.danger-zone { border-color: #c6282866; }

fieldset { border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem; display: grid; gap: .4rem; }
legend { padding: 0 .3rem; font-size: .95rem; }
.check { display: flex !important; gap: .5rem; align-items: baseline; }

.footer { max-width: 960px; margin: 0 auto 2rem; padding: 0 1.25rem; font-size: .85rem; color: var(--muted); }
.footer a { color: var(--muted); }
.stack.wide { max-width: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.45; }
.prose { line-height: 1.6; max-width: 760px; }
.prose h1 { font-size: 1.7rem; }
.prose h2 { font-size: 1.25rem; margin-top: 1.75rem; }
.prose h3 { font-size: 1.05rem; margin-top: 1.25rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: .4rem .6rem; text-align: left; vertical-align: top; }

pre.secret { white-space: pre-wrap; font-size: .85rem; }
.prompt-block { margin-top: 1rem; display: grid; gap: .5rem; }
.prompt-block textarea { width: 100%; }
.prompt-block summary { cursor: pointer; font-weight: 600; }

.login-logo { display: block; max-width: 240px; max-height: 120px; width: auto; height: auto; margin: 3rem auto 1.5rem; }
/* The logo sits above the sign-in panel; close the gap the panel would otherwise leave. */
.narrow.below-logo { margin-top: 0; }
.admin-image { max-width: 240px; max-height: 120px; display: block; margin: .5rem 0; background: var(--bg); padding: .5rem; border-radius: 6px; }
