/* NelisHosting's friend-facing server control surface. */

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

.servers-hero {
    min-height: 300px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 36px;
    padding: 64px 0 34px;
}

.servers-hero h1 {
    max-width: 760px;
    margin: 6px 0 14px;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: .98;
    letter-spacing: -.065em;
}

.servers-hero > div > p:last-child {
    max-width: 610px;
    margin: 0;
    color: var(--muted);
    font-size: 1.06rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 34px;
    margin: 42px 0 18px;
}

.section-heading h2 { margin: 4px 0 0; font-size: 1.72rem; letter-spacing: -.025em; }
.section-heading > p { max-width: 370px; margin: 0; color: var(--muted); font-size: .9rem; }
.compact-heading { margin-top: 0; }

.server-grid-dashboard { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.server-dashboard-card {
    position: relative;
    display: block;
    min-height: 278px;
    overflow: hidden;
    border-color: rgba(119, 217, 177, .31);
    isolation: isolate;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.server-dashboard-card::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: linear-gradient(140deg, rgba(5, 13, 24, .94), rgba(8, 25, 37, .77) 58%, rgba(8, 18, 32, .9));
}

.server-dashboard-card:hover {
    transform: translateY(-4px);
    border-color: rgba(143, 234, 196, .82);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .23);
}

.server-card-art {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.server-dashboard-card:hover .server-card-art { transform: scale(1.04); }

.server-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 234px;
    flex-direction: column;
}

.server-card-content h3 { margin: 22px 0 5px; font-size: 1.38rem; letter-spacing: -.025em; }
.server-owner { margin: 0 !important; color: #c4d6e9 !important; font-size: .79rem !important; }
.server-endpoint { margin: 8px 0 16px !important; color: #f2f7fd !important; font-weight: 720; letter-spacing: .01em; }

.server-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: auto 0 13px;
}

.server-card-meta dt { color: #c7d6e8; font-size: .66rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.server-card-meta dd { margin: 2px 0 0; color: #fff; font-size: .82rem; }
.server-card-link { color: #b7c0ff; font-size: .83rem; font-weight: 750; }
.server-card-link span { margin-left: 4px; transition: margin-left .15s ease; }
.server-dashboard-card:hover .server-card-link span { margin-left: 8px; }
.server-empty-state { display: grid; justify-items: start; text-align: left; }
.server-empty-state h2 { margin: 7px 0 5px; }
.server-empty-state p:not(.eyebrow) { max-width: 500px; }

.server-detail-hero {
    position: relative;
    display: grid;
    min-height: 340px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    align-items: end;
    gap: 32px;
    overflow: hidden;
    margin-top: 16px;
    padding: 40px;
    border: 1px solid rgba(132, 176, 217, .36);
    border-radius: 16px;
    background: #102038;
    isolation: isolate;
}

.server-detail-hero::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: linear-gradient(112deg, rgba(5, 13, 24, .95), rgba(7, 19, 32, .78) 50%, rgba(8, 19, 33, .86));
}

.server-detail-art {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-detail-hero-content, .join-card { position: relative; z-index: 2; }
.server-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.server-title-row h1 { margin: 5px 0 9px; font-size: clamp(2.25rem, 5vw, 4.45rem); line-height: 1; letter-spacing: -.06em; }
.server-detail-copy { margin: 0; color: #dae5f2; }

.runtime-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 820;
}

.runtime-status::before { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; content: ""; background: currentColor; }
.runtime-status-online { color: #84e7bc; border-color: rgba(132, 231, 188, .35); background: rgba(44, 134, 92, .23); }
.runtime-status-starting, .runtime-status-stopping, .runtime-status-installing { color: #f4ca73; border-color: rgba(244, 202, 115, .34); background: rgba(126, 90, 22, .24); }
.runtime-status-offline { color: #ff9ca8; border-color: rgba(255, 117, 133, .48); background: rgba(151, 35, 52, .34); }
.runtime-status-unknown, .runtime-status-unavailable { color: #becce0; border-color: rgba(190, 204, 224, .27); background: rgba(83, 106, 135, .25); }
.runtime-status-suspended { color: #ffaeae; border-color: rgba(255, 174, 174, .3); background: rgba(133, 48, 57, .3); }

.join-card {
    padding: 22px;
    border: 1px solid rgba(202, 226, 250, .18);
    border-radius: 13px;
    background: rgba(7, 17, 30, .71);
    backdrop-filter: blur(10px);
}

.join-card strong { display: block; margin: 7px 0 4px; color: #fff; font-size: 1.15rem; word-break: break-all; }
.join-card p:not(.eyebrow) { margin: 0 0 15px; color: #cfdaea; font-size: .84rem; }

.runtime-feedback { min-height: 24px; margin: 14px 2px 8px; color: var(--muted); font-size: .85rem; }
.runtime-feedback:empty { display: none; }

.runtime-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
}

.runtime-metric {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    padding: 18px;
    border: 1px solid rgba(119, 157, 198, .27);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(20, 39, 65, .88), rgba(13, 25, 43, .92));
}

.runtime-meter { position: absolute; inset: 0; opacity: .45; pointer-events: none; }
.runtime-meter i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, rgba(83, 222, 171, .30), rgba(83, 222, 171, .06)); transition: width .32s ease-out; }
.runtime-chart { position: absolute; z-index: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 68%; opacity: .56; pointer-events: none; }
.runtime-chart polyline { fill: none; stroke: rgba(126, 242, 190, .82); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.runtime-metric > span, .runtime-metric strong, .runtime-metric small { position: relative; z-index: 1; }
.runtime-metric > span { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.runtime-metric strong { display: block; margin: 9px 0 4px; font-size: 1.55rem; line-height: 1; letter-spacing: -.035em; }
.runtime-metric small { color: var(--muted); font-size: .76rem; }

.control-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin: 18px 0;
    padding: 23px 25px;
    border: 1px solid rgba(119, 217, 177, .3);
    border-radius: 13px;
    background: linear-gradient(100deg, rgba(18, 64, 57, .49), rgba(14, 27, 46, .94));
}

.control-card h2 { margin: 5px 0; font-size: 1.25rem; }
.control-card p:not(.eyebrow) { max-width: 590px; margin: 0; color: var(--muted); font-size: .88rem; }
.power-control { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; }
.control-card .resource-inputs { width: min(100%, 620px); grid-template-columns: repeat(3, minmax(120px, 1fr)); align-items: end; }
.control-card .resource-inputs .button { align-self: end; }
.power-control .button[disabled] { cursor: wait; opacity: .46; }
.control-unavailable { color: var(--warning) !important; }

.server-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.activity-card { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: rgba(14, 27, 46, .7); }
.activity-list { display: grid; gap: 0; }
.activity-event { display: flex; gap: 13px; align-items: flex-start; padding: 13px 0; border-top: 1px solid rgba(160, 190, 230, .1); }
.activity-marker { display: block; width: 9px; height: 9px; flex: 0 0 auto; margin-top: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(119, 217, 177, .11); }
.activity-event strong { font-size: .91rem; }
.activity-event p, .empty-activity { margin: 3px 0 0; color: var(--muted); font-size: .81rem; }
.danger-zone { margin: 28px 0 44px; border-color: rgba(239, 145, 145, .34); background: rgba(100, 37, 47, .16); }
.danger-zone > p { margin: 11px 0 0; color: var(--muted); }
.failed-installation-actions { display: grid; justify-items: start; gap: 12px; }
.failed-installation-actions form { display: grid; gap: 10px; max-width: 340px; }

@media (max-width: 880px) {
    .runtime-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .server-detail-hero { grid-template-columns: 1fr; }
    .join-card { max-width: 420px; }
}

@media (max-width: 760px) {
    .servers-hero, .section-heading, .control-card { align-items: flex-start; flex-direction: column; }
    .control-card .resource-inputs { grid-template-columns: 1fr; }
    .servers-hero { min-height: auto; padding: 45px 0 27px; }
    .section-heading { gap: 8px; margin-top: 34px; }
    .server-detail-hero { min-height: 430px; padding: 27px; }
    .runtime-grid, .server-detail-grid { grid-template-columns: 1fr; }
    .power-control { justify-content: flex-start; }
    .server-card-meta { grid-template-columns: 1fr; }
}


.control-settings-link { white-space: nowrap; }

.management-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin: 18px 0;
    padding: 30px 32px;
    border: 1px solid #424575;
    border-radius: 15px;
    background: radial-gradient(circle at 90% 12%, rgba(117, 132, 255, .19), transparent 26%), #17172d;
}
.management-hero h1 { margin: 4px 0 7px; font-size: clamp(2.05rem, 4vw, 3.4rem); letter-spacing: -.055em; }
.management-hero p:not(.eyebrow) { max-width: 620px; margin: 0; color: var(--muted); }
.server-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.server-subnav a { padding: 9px 13px; border: 1px solid #393963; border-radius: 9px; color: #cbd1ff; font-size: .82rem; font-weight: 760; }
.server-subnav a:hover, .server-subnav a.is-active { border-color: #8b98ff; background: #272950; color: #fff; box-shadow: 0 0 16px rgba(112, 130, 255, .16); }
.server-context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin: 14px 0 0;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.server-context-title { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.server-context-title h1 { margin: 3px 0 0; font-size: clamp(1.65rem, 3.5vw, 2.5rem); letter-spacing: -.045em; line-height: 1.1; }
.server-context-controls { justify-content: flex-start; margin-top: 16px; }
.server-context-address { display: grid; justify-items: start; gap: 7px; min-width: 205px; }
.server-context-address > span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.server-context-address strong { font-size: .93rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.server-context-address .button { padding: 7px 11px; font-size: .78rem; }
.server-page-note { margin: 12px 0; color: var(--muted); font-size: .86rem; }
.server-page-note a { color: var(--accent); font-weight: 750; }
.server-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 18px 0; }
.server-page-heading h2 { margin: 0; font-size: 1.35rem; }
.server-page-heading > p { margin: 0; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.server-subnav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.server-subnav a { flex: 0 0 auto; }
.management-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.management-card { padding: 24px; border: 1px solid #393963; border-radius: 13px; background: #17172d; }
.management-card h2 { margin: 5px 0 8px; font-size: 1.32rem; }
.management-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.52; }
.warning-card { border-color: rgba(244, 202, 115, .42); background: rgba(80, 61, 26, .2); }
.management-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 18px; }
.management-form label { display: grid; gap: 7px; color: #d8e6f3; font-size: .76rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.management-form input, .management-form select { min-height: 43px; padding: 0 12px; border: 1px solid #484b7b; border-radius: 9px; outline: none; background: #101126; color: #f7fbff; font: inherit; text-transform: none; }
.management-form input:focus, .management-form select:focus { border-color: #8b98ff; box-shadow: 0 0 0 3px rgba(139, 152, 255, .14); }
.schedule-form { grid-template-columns: minmax(160px, 1.5fr) minmax(130px, 1fr) repeat(2, minmax(80px, .65fr)) minmax(130px, 1fr) auto; }
.management-list-card { margin: 16px 0 40px; }
.management-list { display: grid; gap: 9px; }
.management-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid #33355d; border-radius: 10px; background: #202043; }
.management-row strong { display: block; font-size: .94rem; }
.management-row p { margin: 4px 0 0; color: var(--muted); font-size: .79rem; }
.restore-details summary { cursor: pointer; color: #ffc0c7; font-size: .8rem; font-weight: 800; }
.restore-details form { display: grid; gap: 9px; min-width: 220px; margin-top: 10px; }
.restore-details label { display: grid; gap: 5px; color: var(--muted); font-size: .72rem; }
.restore-details input { min-height: 38px; padding: 0 9px; border: 1px solid #6a3c54; border-radius: 7px; background: #17172d; color: #fff; }

/* Compact violet control surface; green is reserved for a running server. */
.servers-hero { min-height: 245px; padding: 46px 0 28px; }
.servers-hero h1 { font-size: clamp(2.35rem, 5vw, 4.2rem); }
.server-dashboard-card { border-color: rgba(148, 162, 255, .35); }
.server-dashboard-card::before { background: rgba(13, 13, 31, .76); }
.server-dashboard-card:hover { border-color: #9da9ff; box-shadow: 0 16px 34px rgba(0, 0, 0, .28); }
.server-card-link, .template-hero-art .eyebrow, .artwork-source a { color: #b7c0ff; }
.server-detail-hero { border-color: #484b7b; background: #17172d; }
.server-detail-hero::before { background: rgba(13, 13, 31, .74); }
.join-card { border-color: #41446f; background: rgba(23, 23, 45, .88); }
.runtime-metric { border-color: #3d4069; background: #191a35; }
.runtime-meter i { background: rgba(117, 132, 255, .18); }
.runtime-chart polyline { stroke: #9eaaff; }
.control-card { border-color: #424575; background: #191a35; }
.activity-card { border-color: #393963; background: #17172d; }
.activity-marker { background: #95a2ff; box-shadow: 0 0 0 4px rgba(148, 162, 255, .12); }
.settings-hero { border-color: #424575; background: #191a35; }
.settings-notice, .settings-card, .settings-save-bar { border-color: #393963; background: #17172d; }
.player-manager { align-items: flex-start; }
.player-list { display: grid; width: min(100%, 650px); gap: 9px; }
.player-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #393963; border-radius: 9px; background: #202043; }
.player-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.player-actions .button { padding: 6px 9px; font-size: .75rem; }
.player-roster-list { display: grid; gap: 10px; }
.player-roster-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.player-roster-toolbar label { display: grid; gap: 6px; flex: 1; max-width: 360px; }
.player-roster-toolbar input { width: 100%; }
.player-identity { display: grid; gap: 8px; }
.player-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.player-role { font-size: .75rem; color: #d0ccff; border: 1px solid #57517d; border-radius: 5px; padding: 2px 6px; }
.player-roster-help { font-size: .85rem; color: var(--muted, #b3adc9); margin-top: 18px; }
.player-roster-help a { color: #b7c0ff; text-decoration: underline; text-underline-offset: 3px; }
.player-network { color: var(--muted, #b3adc9); overflow-wrap: anywhere; }
.steam-gslt-steps { display: grid; gap: 4px; margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: .84rem; }
.steam-gslt-steps a { color: #b7c0ff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .player-row { align-items: flex-start; flex-direction: column; }.player-actions { justify-content: flex-start; } }
@media (max-width: 900px) { .schedule-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }.management-form .button { justify-self: start; } }
@media (max-width: 760px) { .management-hero, .management-row { align-items: flex-start; flex-direction: column; }.management-layout { grid-template-columns: 1fr; }.management-form, .schedule-form { grid-template-columns: 1fr; }.restore-details { width: 100%; }.restore-details form { width: 100%; } }
@media (max-width: 760px) {
    .server-context { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
    .server-context-address { grid-template-columns: 1fr auto; align-items: center; min-width: 0; }
    .server-context-address > span { grid-column: 1 / -1; }
    .server-context-address .button { grid-column: 2; grid-row: 2; }
    .server-context-controls .button { flex: 1 1 auto; }
    .server-page-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
}

.catalog-result-list { display: grid; gap: 8px; margin-top: 16px; }
.catalog-result { display: grid; gap: 5px; padding: 14px; border: 1px solid #393963; border-radius: 10px; background: #111126; }
.catalog-result:hover { border-color: #8b98ff; background: #202043; }
.catalog-result span, .catalog-result small { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.management-row form { margin: 0; }
.player-manager-page { margin-top: 16px; }
.jar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.jar-choice { display: grid; gap: 8px; padding: 18px; border: 1px solid #393963; border-radius: 11px; background: #111126; }
.jar-choice.is-current { border-color: #75d9b1; background: rgba(50, 111, 88, .17); }
.jar-choice p, .jar-choice span { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.jar-choice form { display: grid; gap: 9px; margin-top: 4px; }
.jar-choice label { display: grid; gap: 5px; color: var(--muted); font-size: .75rem; }
.jar-choice input { min-height: 38px; padding: 0 10px; border: 1px solid #393963; border-radius: 8px; background: #0d0d20; color: #fff; }
@media (max-width: 760px) { .jar-grid { grid-template-columns: 1fr; } }

.settings-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 26px;
    margin: 18px 0;
    padding: 32px;
    border: 1px solid rgba(124, 182, 223, .3);
    border-radius: 15px;
    background:
        radial-gradient(circle at 94% 12%, rgba(82, 188, 150, .17), transparent 27%),
        linear-gradient(130deg, rgba(16, 40, 62, .95), rgba(10, 23, 39, .96));
}

.settings-hero h1 { margin: 5px 0 8px; font-size: clamp(2.1rem, 4vw, 3.35rem); letter-spacing: -.055em; }
.settings-hero > div > p:not(.eyebrow) { max-width: 620px; margin: 0; color: #cddbeb; }

.settings-state-card {
    display: grid;
    min-width: min(100%, 255px);
    gap: 9px;
    padding: 18px;
    border: 1px solid rgba(183, 215, 240, .18);
    border-radius: 12px;
    background: rgba(4, 15, 27, .56);
}

.settings-state-card strong { font-size: .96rem; }
.settings-state-card p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }

.settings-notice,
.settings-card,
.settings-save-bar {
    border: 1px solid rgba(126, 169, 205, .29);
    border-radius: 13px;
    background: rgba(14, 28, 47, .72);
}

.settings-notice {
    margin: 16px 0;
    padding: 17px 20px;
}

.settings-notice strong { display: block; margin-bottom: 4px; }
.settings-notice p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.settings-notice-warning { border-color: rgba(244, 202, 115, .43); background: rgba(97, 69, 19, .22); }

.paper-settings-form { display: grid; gap: 16px; }
.settings-card { padding: 24px; }
.settings-card .section-heading { margin: 0 0 20px; }
.settings-card .section-heading p { max-width: 380px; }

.settings-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.settings-fields-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-field { display: grid; gap: 7px; min-width: 0; }
.settings-field-full { grid-column: 1 / -1; }
.settings-field > span:first-child { color: #d8e6f3; font-size: .77rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.settings-field input:not([type="checkbox"]),
.settings-field select {
    width: 100%;
    min-height: 43px;
    border: 1px solid rgba(144, 181, 215, .32);
    border-radius: 9px;
    outline: none;
    background: rgba(5, 16, 28, .73);
    color: #f7fbff;
    font: inherit;
}

.settings-field input:not([type="checkbox"]) { padding: 0 12px; }
.settings-field select { padding: 0 10px; }
.settings-field input:focus,
.settings-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(116, 222, 172, .13); }
.settings-field input:disabled,
.settings-field select:disabled { cursor: not-allowed; opacity: .52; }
.settings-field small { color: var(--muted); font-size: .74rem; line-height: 1.42; }

.settings-toggle { grid-column: span 1; }
.toggle-row { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 0 2px; color: #d3e0ec; font-size: .85rem; line-height: 1.42; }
.toggle-row input { width: 17px; height: 17px; accent-color: var(--accent); }
.toggle-row span { text-transform: none; letter-spacing: normal; font-weight: 500; }

.settings-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 19px 22px;
    margin-bottom: 42px;
    background: linear-gradient(100deg, rgba(16, 62, 55, .47), rgba(14, 28, 47, .88));
}

.settings-save-bar strong { display: block; margin-bottom: 3px; }
.settings-save-bar p { max-width: 660px; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.settings-save-bar .button[disabled] { cursor: not-allowed; opacity: .48; }

@media (max-width: 880px) {
    .settings-fields,
    .settings-fields-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .settings-hero,
    .settings-save-bar { align-items: flex-start; flex-direction: column; }
    .settings-hero { padding: 24px; }
    .settings-fields,
    .settings-fields-wide { grid-template-columns: 1fr; }
    .settings-toggle { grid-column: auto; }
    .settings-save-bar .button { width: 100%; }
}


.control-action-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; }

.console-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 26px;
    margin: 18px 0;
    padding: 32px;
    border: 1px solid rgba(124, 182, 223, .3);
    border-radius: 15px;
    background:
        radial-gradient(circle at 94% 12%, rgba(82, 188, 150, .17), transparent 27%),
        linear-gradient(130deg, rgba(16, 40, 62, .95), rgba(10, 23, 39, .96));
}

.console-hero h1 { margin: 5px 0 8px; font-size: clamp(2.1rem, 4vw, 3.35rem); letter-spacing: -.055em; }
.console-hero > div > p:not(.eyebrow) { max-width: 620px; margin: 0; color: #cddbeb; }
.console-state-card {
    display: grid;
    min-width: min(100%, 255px);
    gap: 9px;
    padding: 18px;
    border: 1px solid rgba(183, 215, 240, .18);
    border-radius: 12px;
    background: rgba(4, 15, 27, .56);
}
.console-state-card strong { font-size: .96rem; }
.console-state-card p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }

.console-notice {
    margin: 16px 0;
    padding: 17px 20px;
    border: 1px solid rgba(126, 169, 205, .29);
    border-radius: 13px;
    background: rgba(14, 28, 47, .72);
}
.console-notice strong { display: block; margin-bottom: 4px; }
.console-notice p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }

.console-card {
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid rgba(108, 168, 207, .32);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(15, 33, 54, .95), rgba(7, 17, 30, .98));
    box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.console-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(160, 190, 230, .13);
}
.console-toolbar h2 { margin: 4px 0 0; font-size: 1.25rem; }
.console-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 10px; }
.console-connection-state {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid rgba(190, 204, 224, .27);
    border-radius: 999px;
    color: #becce0;
    background: rgba(83, 106, 135, .25);
    font-size: .76rem;
    font-weight: 760;
}
.console-connection-state::before { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; content: ""; background: currentColor; }
.console-card[data-console-state="running"] .console-connection-state { border-color: rgba(132, 231, 188, .35); color: #84e7bc; background: rgba(44, 134, 92, .23); }
.console-card[data-console-state="unavailable"] .console-connection-state { border-color: rgba(244, 202, 115, .34); color: #f4ca73; background: rgba(126, 90, 22, .24); }

.console-output {
    display: block;
    min-height: 360px;
    max-height: 580px;
    margin: 0;
    padding: 22px;
    overflow: auto;
    color: #d9f4e7;
    background:
        linear-gradient(90deg, rgba(119, 217, 177, .035) 1px, transparent 1px) 0 0 / 38px 38px,
        linear-gradient(rgba(119, 217, 177, .03) 1px, transparent 1px) 0 0 / 38px 38px,
        #071321;
    font: .82rem/1.58 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow-wrap: anywhere;
    tab-size: 4;
    white-space: pre-wrap;
}
.console-output:focus { outline: 2px solid rgba(119, 217, 177, .72); outline-offset: -2px; }

.console-command-form {
    padding: 16px 22px 18px;
    border-top: 1px solid rgba(160, 190, 230, .13);
    background: rgba(4, 12, 23, .44);
}
.console-command-form label { display: block; margin-bottom: 8px; font-size: .82rem; font-weight: 800; }
.console-command-controls { display: flex; gap: 10px; }
.console-command-controls input { min-width: 0; flex: 1; font: .85rem ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.console-command-form p { margin: 8px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.console-command-form .console-command-status { min-height: 1.1em; color: #84e7bc; }
@media (max-width: 560px) { .console-command-controls { flex-direction: column; } }

.console-guidance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0 42px; }
.console-guidance article { padding: 19px 21px; border: 1px solid rgba(126, 169, 205, .24); border-radius: 12px; background: rgba(14, 28, 47, .68); }
.console-guidance strong { display: block; margin-bottom: 4px; }
.console-guidance p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }

.files-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: 16px; margin: 16px 0; }
.files-card { padding: 22px; border: 1px solid rgba(126, 169, 205, .24); border-radius: 12px; background: rgba(14, 28, 47, .7); }
.files-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.files-toolbar h2, .files-upload-card h2 { margin: 4px 0 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.file-list { overflow: hidden; border: 1px solid rgba(160, 190, 230, .12); border-radius: 9px; }
.file-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 49px; padding: 10px 13px; border-top: 1px solid rgba(160, 190, 230, .1); font-size: .85rem; }
.file-row:first-child { border-top: 0; }
.file-row span, .file-row small { color: var(--muted); font-size: .74rem; }
.file-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.file-row:hover, .file-row-directory { background: rgba(119, 217, 177, .08); }
.file-row-directory span { color: var(--accent); }
.file-row-muted { opacity: .6; }
.files-upload-card { align-self: start; }
.files-upload-card p { color: var(--muted); font-size: .86rem; }
.files-upload-card form { display: grid; gap: 11px; margin-top: 18px; }
.file-editor-card { margin: 16px 0 42px; }
.file-editor-card textarea { width: 100%; min-height: 390px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; background: #07111f; color: #dce9f7; padding: 14px; font: .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; tab-size: 4; }
.file-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.file-editor-actions p, .file-editor-empty p { margin: 0; color: var(--muted); font-size: .82rem; }
.file-revision { color: var(--muted); font-size: .75rem; }
.file-editor-empty { margin: 16px 0 42px; }

@media (max-width: 760px) {
    .control-action-links { justify-content: flex-start; }
    .console-hero, .console-toolbar { align-items: flex-start; flex-direction: column; }
    .console-toolbar-actions { justify-content: flex-start; }
    .console-output { min-height: 300px; padding: 18px; }
    .console-guidance { grid-template-columns: 1fr; }
    .files-layout { grid-template-columns: 1fr; }
    .file-editor-actions, .files-toolbar { align-items: flex-start; flex-direction: column; }
    .file-row { grid-template-columns: 60px minmax(0, 1fr); }
    .file-row small { grid-column: 2; }
}

/* One visual language for settings, console and files. */
.settings-hero, .console-hero { border-color: #424575; background: #191a35; }
.settings-hero > div > p:not(.eyebrow), .console-hero > div > p:not(.eyebrow) { color: var(--muted); }
.settings-state-card, .console-state-card { border-color: #41446f; background: #202043; }
.settings-notice, .settings-card, .settings-save-bar, .console-notice, .console-guidance article, .files-card { border-color: #393963; background: #17172d; }
.console-card { border-color: #424575; background: #17172d; box-shadow: 0 18px 42px rgba(0, 0, 0, .22); }
.console-output { color: #e6e7ff; background: #101025; }
.console-output:focus { outline-color: #9eaaff; }
a.file-row:hover, .file-row-directory { background: rgba(148, 162, 255, .11); }
.file-editor-card textarea { background: #101025; color: #e6e7ff; }
.server-card-pending { background: #27211d; }

.installation-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 16px 0;
    padding: 22px;
    border: 1px solid #393963;
    border-radius: 13px;
    background: #17172d;
}
.installation-summary h2 { margin: 4px 0 7px; font-size: 1.3rem; }
.installation-summary p:not(.eyebrow) { max-width: 620px; margin: 0; color: var(--muted); font-size: .86rem; }
.installation-summary dl { display: grid; grid-template-columns: repeat(2, minmax(125px, 1fr)); gap: 10px; margin: 0; }
.installation-summary dt { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.installation-summary dd { margin: 4px 0 0; font-size: .92rem; font-weight: 760; }
.installation-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 16px 0;
    padding: 22px;
    border: 1px solid #393963;
    border-radius: 13px;
    background: #17172d;
}
.installation-actions h2 { margin: 4px 0 7px; font-size: 1.3rem; }
.installation-actions > div > p:not(.eyebrow) { max-width: 660px; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.installation-action-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 9px; }
.installation-action-buttons form { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0; }
.installation-recovery-confirmation { max-width: 270px; padding: 7px 10px; border: 1px solid rgba(158, 170, 255, .2); border-radius: 8px; background: rgba(66, 69, 117, .2); font-size: .76rem; }
.pending-operation-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.pending-operation-actions form { margin: 0; }
.installation-event-list { display: grid; gap: 0; margin: 0; padding: 0 22px 20px; list-style: none; }
.installation-event-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid rgba(160, 190, 230, .1); }
.installation-event-list .installation-event-empty { grid-template-columns: 1fr; }
.installation-event-list time { color: #9eaaff; font: .75rem ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.installation-event-list strong { display: block; font-size: .88rem; }
.installation-event-list p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.runtime-status-queued, .runtime-status-retrying { color: #f4ca73; border-color: rgba(244, 202, 115, .34); background: rgba(126, 90, 22, .24); }

/* Owner interface: charcoal surfaces, orange actions, semantic status colors. */
body.admin-theme {
    color-scheme: dark;
    --canvas: #0b0b0c;
    --surface: #141517;
    --surface-soft: #1d1f22;
    --line: #303236;
    --text: #f3f3f3;
    --muted: #a6a7aa;
    --accent: #f16423;
    --accent-dark: #b84918;
    --warning: #eab64f;
    --danger: #f16d65;
    --success: #58d68d;
    background: var(--canvas);
}

body.admin-theme .site-header { background: rgba(11, 11, 12, .96); }
body.admin-theme .brand-mark { background: var(--accent); color: #17110e; }
body.admin-theme nav { align-items: center; }
body.admin-theme nav a[aria-current="page"] { color: var(--accent); font-weight: 750; }
body.admin-theme nav a:hover, body.admin-theme .back-link:hover { color: var(--accent); }
body.admin-theme .account-name { color: var(--text); }
body.admin-theme .button-primary { background: var(--accent); color: #17110e; }
body.admin-theme .button-primary:hover { background: #ff7839; }
body.admin-theme .button-secondary { border-color: var(--line); background: var(--surface-soft); color: var(--text); }
body.admin-theme .button-secondary:hover { border-color: #515357; background: #282a2d; }
body.admin-theme .button-disabled { background: #242629; color: #909195; }
body.admin-theme .button-danger { background: #8f302e; color: #fff; }
body.admin-theme .game-card:hover { border-color: var(--accent); }
body.admin-theme .game-card .category, body.admin-theme .game-card p,
body.admin-theme .game-card .template-stats dt, body.admin-theme .game-card .card-footer,
body.admin-theme .template-hero-art .hero-copy, body.admin-theme .artwork-source,
body.admin-theme .server-detail-copy, body.admin-theme .server-owner,
body.admin-theme .server-card-meta dt { color: #c3c4c6; }
body.admin-theme .template-hero-art .provision-panel { background: rgba(20, 21, 23, .92); }
body.admin-theme .wizard-steps .wizard-step-active { color: var(--accent); }
body.admin-theme .wizard-steps .wizard-step-active span { border-color: var(--accent); background: rgba(241, 100, 35, .16); box-shadow: 0 0 0 3px rgba(241, 100, 35, .1); }
body.admin-theme .profile-option:has(input:checked) { border-color: var(--accent); background: rgba(241, 100, 35, .1); }
body.admin-theme .wizard-summary { border-color: var(--line); background: var(--surface-soft); }
body.admin-theme .capacity-banner { border-color: var(--line); background: var(--surface); color: var(--text); }
body.admin-theme .capacity-warning { border-color: rgba(234, 182, 79, .4); background: rgba(234, 182, 79, .08); }
body.admin-theme .server-card { border-color: var(--line); background: var(--surface); }
body.admin-theme .installation-summary, body.admin-theme .installation-actions {
    border-color: var(--line);
    background: var(--surface);
}
body.admin-theme .installation-recovery-confirmation { border-color: var(--line); background: var(--surface-soft); }
body.admin-theme .installation-event-list time { color: var(--accent); }
body.admin-theme .notice { border-color: #45403d; background: #1b1918; color: #f1e9e5; }
body.admin-theme .notice strong, body.admin-theme .eyebrow { color: var(--accent); }
body.admin-theme .flash-success { border-color: rgba(88, 214, 141, .28); background: rgba(33, 101, 63, .16); color: #c9f0d8; }
body.admin-theme .field-error { color: #ff8c83; }
body.admin-theme input:focus, body.admin-theme select:focus, body.admin-theme textarea:focus,
body.admin-theme button:focus-visible, body.admin-theme a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
body.admin-theme input[type="radio"], body.admin-theme input[type="checkbox"],
body.admin-theme input[type="range"] { accent-color: var(--accent); }
body.admin-theme .status-available, body.admin-theme .status-active {
    color: var(--success);
    background: rgba(88, 214, 141, .12);
}
body.admin-theme .status-queued, body.admin-theme .status-provisioning,
body.admin-theme .status-retrying, body.admin-theme .status-installing,
body.admin-theme .status-verifying, body.admin-theme .status-deletion_pending,
body.admin-theme .status-deletion_retrying {
    color: var(--warning);
    background: rgba(234, 182, 79, .12);
}
body.admin-theme .status-failed, body.admin-theme .status-missing,
body.admin-theme .status-deletion_failed, body.admin-theme .status-installation_failed {
    color: var(--danger);
    background: rgba(241, 109, 101, .12);
}
body.admin-theme .status-suspended { color: #b8bbc0; background: rgba(184, 187, 192, .12); }
body.admin-theme .management-hero, body.admin-theme .settings-hero, body.admin-theme .console-hero {
    border-color: var(--line);
    background: var(--surface);
}
body.admin-theme .management-card, body.admin-theme .activity-card,
body.admin-theme .settings-notice, body.admin-theme .settings-card,
body.admin-theme .settings-save-bar, body.admin-theme .console-notice,
body.admin-theme .console-guidance article, body.admin-theme .files-card,
body.admin-theme .console-card {
    border-color: var(--line);
    background: var(--surface);
}
body.admin-theme .server-subnav a { border-color: var(--line); background: var(--surface); color: var(--muted); }
body.admin-theme .server-subnav a:hover, body.admin-theme .server-subnav a.is-active {
    border-color: var(--accent);
    background: rgba(241, 100, 35, .12);
    color: var(--text);
    box-shadow: none;
}
body.admin-theme .management-form label, body.admin-theme .settings-field > span:first-child,
body.admin-theme .toggle-row { color: #d5d6d8; }
body.admin-theme .management-form input, body.admin-theme .management-form select,
body.admin-theme .restore-details input, body.admin-theme .settings-field input,
body.admin-theme .settings-field select, body.admin-theme .console-output,
body.admin-theme .file-editor-card textarea {
    border-color: var(--line);
    background: #0f1011;
    color: var(--text);
}
body.admin-theme .management-form input:focus, body.admin-theme .management-form select:focus,
body.admin-theme .settings-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(241, 100, 35, .14); }
body.admin-theme .management-row, body.admin-theme .player-row,
body.admin-theme .catalog-result, body.admin-theme .jar-choice,
body.admin-theme .settings-state-card, body.admin-theme .console-state-card {
    border-color: var(--line);
    background: var(--surface-soft);
}
body.admin-theme .catalog-result:hover, body.admin-theme .file-row-directory,
body.admin-theme a.file-row:hover { border-color: #45474b; background: #242629; }
body.admin-theme .player-role { border-color: #4b4d51; color: #e5e5e5; }
body.admin-theme .server-dashboard-card { border-color: var(--line); }
body.admin-theme .server-dashboard-card::before { background: rgba(11, 11, 12, .78); }
body.admin-theme .server-dashboard-card:hover { border-color: var(--accent); }
body.admin-theme .server-card-link, body.admin-theme .template-hero-art .eyebrow,
body.admin-theme .artwork-source a, body.admin-theme .steam-gslt-steps a,
body.admin-theme .installation-event-list time { color: var(--accent); }
body.admin-theme .server-detail-hero { border-color: var(--line); background: var(--surface); }
body.admin-theme .server-detail-hero::before { background: rgba(11, 11, 12, .78); }
body.admin-theme .join-card { border-color: #3c3e41; background: rgba(20, 21, 23, .92); }
body.admin-theme .runtime-metric { border-color: var(--line); background: var(--surface); }
body.admin-theme .runtime-meter i { background: rgba(241, 100, 35, .18); }
body.admin-theme .runtime-chart polyline { stroke: var(--accent); }
body.admin-theme .control-card { border-color: var(--line); background: var(--surface); }
body.admin-theme .activity-marker { background: var(--accent); box-shadow: 0 0 0 4px rgba(241, 100, 35, .12); }
body.admin-theme .console-output { color: #ededed; }
body.admin-theme .console-output:focus { outline-color: var(--accent); }
body.admin-theme .file-editor-card textarea { background: #0f1011; color: #ededed; }
body.admin-theme .jar-choice.is-current { border-color: rgba(88, 214, 141, .45); background: rgba(88, 214, 141, .08); }
body.admin-theme .installation-recovery-confirmation { border-color: var(--line); background: var(--surface-soft); }
body.admin-theme .server-card-pending { border-color: rgba(234, 182, 79, .35); background: #211c14; }

.admin-dashboard { padding: 38px 0 48px; }
.admin-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.admin-page-heading h1 { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.05em; line-height: 1.05; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.admin-stat-card { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px 19px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.admin-stat-card > span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.admin-stat-card strong { font-size: 1.85rem; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.admin-stat-card strong small { color: var(--muted); font-size: .98rem; font-weight: 600; letter-spacing: 0; }
.admin-stat-card .admin-stat-unknown { color: var(--muted); font-size: 1.35rem; }
.admin-panel { overflow: hidden; margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.admin-panel-heading h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.015em; }
.admin-panel-heading > span { display: grid; min-width: 27px; height: 27px; place-items: center; padding: 0 7px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: .76rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.admin-operation { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.admin-operation:last-child { border-bottom: 0; }
.admin-operation-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; flex: 1; }
.admin-operation-game, .admin-server-game { color: var(--muted); font-size: .74rem; }
.admin-operation h3 { margin: 3px 0; font-size: .97rem; }
.admin-operation p { margin: 0; color: var(--muted); font-size: .78rem; }
.admin-operation .admin-operation-note { margin-top: 7px; color: var(--warning); }
.admin-operation-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 8px 14px; }
.admin-operation-actions form { margin: 0; }
.admin-operation-actions .button { padding: 8px 11px; font-size: .78rem; }
.admin-text-link { color: var(--accent); font-size: .8rem; font-weight: 750; white-space: nowrap; }
.admin-text-link:hover { color: #ff8a56; text-decoration: underline; text-underline-offset: 3px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.admin-table th { padding: 11px 16px; background: #101112; color: var(--muted); font-size: .66rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.admin-table td { padding: 14px 16px; border-top: 1px solid var(--line); color: #dddddf; font-size: .8rem; vertical-align: middle; }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.admin-table td:first-child { min-width: 175px; }
.admin-server-name, .admin-server-game { display: block; }
.admin-server-name { margin-bottom: 3px; color: var(--text); font-size: .86rem; }
.admin-server-address { color: #e8e8e8; font: .76rem ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.admin-empty-cell { padding: 28px 20px !important; color: var(--muted) !important; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 900px) {
    .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .admin-dashboard { padding-top: 27px; }
    .admin-page-heading { align-items: flex-start; flex-direction: column; }
    .admin-page-heading .button { width: 100%; text-align: center; }
    .admin-operation, .admin-operation-summary { align-items: flex-start; flex-direction: column; }
    .admin-operation-actions { justify-content: flex-start; }
    .admin-table { min-width: 800px; }
}

@media (max-width: 420px) {
    .admin-stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .admin-stat-card { min-height: 96px; padding: 13px; }
    .admin-stat-card strong { font-size: 1.55rem; }
}
@media (max-width: 760px) {
    .installation-summary, .installation-actions { align-items: flex-start; flex-direction: column; }
    .installation-summary dl { width: 100%; }
    .installation-action-buttons { justify-content: flex-start; }
}

/* Keep server controls usable at narrow widths and when users zoom in. */
@media (max-width: 880px) {
    .server-subnav {
        flex-wrap: wrap;
        overflow: visible;
        padding-bottom: 0;
    }
    .server-subnav a {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .control-settings-link { white-space: normal; overflow-wrap: anywhere; }
    .installation-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .installation-summary dl > div { min-width: 0; }
    .installation-summary dd { overflow-wrap: anywhere; }
}

@media (max-width: 760px) {
    .server-grid,
    .server-grid-dashboard { grid-template-columns: minmax(0, 1fr); }
    .restore-details form { min-width: 0; }
}
