:root {
    color-scheme: light;
    --ink: #17342b;
    --muted: #5f746c;
    --forest: #176b52;
    --forest-dark: #0f4c3a;
    --leaf: #dff3dc;
    --sky: #eaf7ff;
    --sun: #ffd875;
    --paper: rgba(255, 255, 255, .94);
    --line: rgba(23, 52, 43, .14);
    --danger: #9d2f2f;
    --success: #176b52;
    --shadow: 0 18px 50px rgba(30, 72, 57, .14);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: linear-gradient(160deg, var(--sky), #f5f8e9 52%, #e7f6df); }
body { margin: 0; min-height: 100%; color: var(--ink); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--forest); }
code { padding: .12rem .35rem; border-radius: .35rem; background: #eef2ef; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 56px; }
.shell.narrow { width: min(760px, calc(100% - 28px)); }
.hero { display: flex; align-items: center; gap: 18px; padding: 26px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(226,246,222,.92)); box-shadow: var(--shadow); }
.hero.compact { padding: 20px 24px; }
.hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.hero.compact h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.eyebrow { margin: 0 0 5px; color: var(--forest); font-size: .78rem; font-weight: 800; letter-spacing: .18em; }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 74px; height: 74px; border-radius: 24px 24px 30px 30px; color: white; background: linear-gradient(145deg, var(--forest), #42a56c); box-shadow: inset 0 -8px 0 rgba(0,0,0,.08); font-size: 1.5rem; font-weight: 900; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0; }
.toolbar .identity { color: var(--muted); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 22px; }
.card { margin-top: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card.soft { box-shadow: none; background: rgba(255,255,255,.72); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 14px; color: white; background: var(--forest); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 8px 18px rgba(23,107,82,.18); }
.button:hover, button:hover { background: var(--forest-dark); }
.button.secondary, button.secondary { color: var(--forest); background: var(--leaf); box-shadow: none; }
.button.danger, button.danger { color: white; background: var(--danger); }
.button.full { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid h2, .form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .9rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(23,52,43,.24); border-radius: 12px; color: var(--ink); background: white; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(54,161,111,.18); border-color: var(--forest); }
.notice { margin: 18px 0; padding: 15px 18px; border-radius: 14px; border: 1px solid; background: white; }
.notice.error { color: var(--danger); border-color: rgba(157,47,47,.35); background: #fff3f3; }
.notice.success { color: var(--success); border-color: rgba(23,107,82,.3); background: #effcf4; }
.notice.info { color: #275b74; border-color: rgba(39,91,116,.3); background: #eef8fd; }
.stat { font-size: 2.2rem; font-weight: 900; letter-spacing: -.04em; }
.stat-label { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.status { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: var(--leaf); color: var(--forest); }
.status.off { background: #f5e8e8; color: var(--danger); }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.inline-form input { width: 155px; min-height: 38px; }
.inline-form button { min-height: 38px; padding: 7px 11px; font-size: .82rem; }
.download-panel { text-align: center; }
.download-panel .app-icon { display: grid; place-items: center; width: 118px; height: 118px; margin: 0 auto 18px; border-radius: 38px; color: white; background: linear-gradient(145deg, var(--forest), #63b96f); font-size: 2.2rem; font-weight: 900; box-shadow: var(--shadow); }
.meta { color: var(--muted); }
footer { margin-top: 34px; padding: 20px; color: var(--muted); text-align: center; }
footer span { font-size: .88rem; }
@media (max-width: 680px) {
    .shell { width: min(100% - 20px, 1180px); padding-top: 18px; }
    .hero { padding: 18px; border-radius: 20px; }
    .brand-mark { width: 58px; height: 58px; border-radius: 19px; }
    .form-grid { grid-template-columns: 1fr; }
    .toolbar { align-items: flex-start; flex-direction: column; }
    .card { padding: 18px; border-radius: 18px; }
}

/* CapyDash 4.2.0 multiplayer administration */
.stat-card { min-height: 132px; }
.online-health-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.health-row { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.health-dot { width: 14px; height: 14px; border-radius: 50%; background: #a43b3b; box-shadow: 0 0 0 5px rgba(164,59,59,.12); }
.health-dot.online { background: #1f9a61; box-shadow: 0 0 0 5px rgba(31,154,97,.14); }
.health-dot.offline { background: #a43b3b; }
.compact-list { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.compact-list li + li { margin-top: .35rem; }
.level-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.level-admin-card { display: grid; gap: 9px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.74); }
.level-admin-card > span:not(.status) { color: var(--muted); font-size: .86rem; }
@media (max-width: 680px) {
    .online-health-grid { grid-template-columns: 1fr; }
    .level-admin-grid { grid-template-columns: 1fr; }
}
