/* GamePanel — base stylesheet. No build step; edit directly. */

:root {
    --bg: #0d1017;
    --surface: #151a23;
    --surface-2: #1c222d;
    --border: #262d3a;
    --text: #e4e7ec;
    --muted: #8b93a3;
    --accent: #4f8cff;
    --accent-hover: #3d7bf0;
    --ok: #35c07f;
    --bad: #f2555a;
    --warn: #e0a33a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: .875em;
    background: var(--surface-2);
    padding: .1em .4em;
    border-radius: 4px;
}

h1 { font-size: 1.4rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 1rem; }
h3 { font-size: .95rem; margin: 1.5rem 0 .5rem; }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.inline { display: inline; }

/* --- Chrome --- */

.topbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand { font-weight: 600; color: var(--text); }
.brand:hover { text-decoration: none; }

.topnav { display: flex; gap: 1.25rem; }
.topnav a { color: var(--muted); font-size: .9rem; }
.topnav a:hover { color: var(--text); text-decoration: none; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.who { color: var(--muted); font-size: .875rem; }

.shell { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.foot {
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* --- Surfaces --- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.card-narrow { max-width: 460px; width: 100%; }
.card-brand { text-align: center; font-size: 1.25rem; margin: 0 0 1.5rem; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.card-head h2 { margin: 0; }

.cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.empty {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    text-align: center;
}
.empty p { margin: .25rem 0; }

/* --- Forms --- */

.stack { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-size: .85rem; color: var(--muted); }
.field small { font-size: .78rem; }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], select, textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: .55rem .7rem;
    font: inherit;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, .18);
}

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; }
.check input { margin-top: .25rem; }

.searchbar { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.searchbar input { max-width: 380px; }

/* --- Buttons --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: .55rem 1rem;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }

.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* --- Data --- */

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
    text-align: left;
    font-weight: 500;
    color: var(--muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 0 .75rem .6rem;
    border-bottom: 1px solid var(--border);
}
.table td { padding: .7rem .75rem; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }

.details { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; margin: 0; font-size: .9rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    color: var(--text);
}
.stat:hover { border-color: var(--accent); text-decoration: none; }
.stat-muted { opacity: .55; }
.stat-muted:hover { border-color: var(--border); }
.stat-value { font-size: 1.75rem; font-weight: 600; line-height: 1; }
.stat-label { font-size: .8rem; color: var(--muted); }

.server-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    color: var(--text);
    display: block;
}
.server-card:hover { border-color: var(--accent); text-decoration: none; }
.server-card h2 { font-size: 1rem; margin: .5rem 0 .25rem; }
.server-card .addr { font-family: ui-monospace, monospace; font-size: .85rem; color: var(--muted); margin: .5rem 0 0; }

.status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-running { background: var(--ok); }
.status-installing, .status-starting { background: var(--warn); }
.status-offline, .status-suspended { background: var(--bad); }

.tag {
    display: inline-block;
    font-size: .75rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
}
.tag-admin { background: rgba(79, 140, 255, .15); color: var(--accent); }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: .875rem; }

/* --- Feedback --- */

.alert {
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    border: 1px solid transparent;
}
.alert-ok { background: rgba(53, 192, 127, .12); border-color: rgba(53, 192, 127, .35); color: #7fe0b0; }
.alert-bad { background: rgba(242, 85, 90, .12); border-color: rgba(242, 85, 90, .35); color: #ff9195; }
.alert-info { background: rgba(79, 140, 255, .12); border-color: rgba(79, 140, 255, .35); color: #9dbcff; }

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

.error-page { text-align: center; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--muted); margin: 0; line-height: 1; }
.error-page h2 { margin: .5rem 0; }
.error-page .btn { margin-top: 1.5rem; }

@media (max-width: 640px) {
    .field-row { grid-template-columns: 1fr; }
    .topnav { gap: .875rem; }
    .shell { padding: 1.5rem 1rem 3rem; }
}
