:root {
    --bg: #0f172a;
    --panel: #111827;
    --line: rgba(255,255,255,.1);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted2: #94a3b8;
    --blue: #2563eb;
    --red: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .18), transparent 34%),
        radial-gradient(circle at top right, rgba(239, 68, 68, .12), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
}

.topbar {
    min-height: 74px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, .84);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    color: white;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: .4px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, #2563eb, #ef4444);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 900;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.card {
    background: rgba(17, 24, 39, .88);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 22px 70px rgba(0,0,0,.25);
}

.hero {
    padding: 48px;
}

.hero h1 {
    font-size: clamp(42px, 7vw, 82px);
    line-height: .95;
    margin: 22px 0 18px;
    letter-spacing: -2px;
}

.hero p,
.card p {
    color: var(--muted);
    line-height: 1.75;
    font-size: 17px;
}

.badge {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .22);
    border: 1px solid rgba(37, 99, 235, .35);
    color: #dbeafe;
    font-weight: 800;
    font-size: 13px;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 17px;
    border-radius: 14px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.btn-secondary {
    background: #273244;
}

.btn-small {
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.grid {
    display: grid;
    gap: 20px;
    margin-top: 22px;
}

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

.auth-card {
    max-width: 520px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 17px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: #0b1220;
    color: white;
    outline: none;
}

input:focus {
    border-color: rgba(37, 99, 235, .8);
}

.alert {
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(239, 68, 68, .16);
    border: 1px solid rgba(239, 68, 68, .34);
    color: #fecaca;
    margin-bottom: 18px;
}

.muted {
    color: var(--muted2);
}

.user-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: var(--muted);
    font-size: 13px;
}

.stat-card span {
    display: block;
    color: var(--muted2);
    margin-bottom: 10px;
}

.stat-card strong {
    font-size: 22px;
}

@media (max-width: 800px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .nav {
        flex-wrap: wrap;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 30px;
    }
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.small {
    font-size: 13px;
}

.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions-cell form {
    margin: 0;
}

.btn-danger {
    background: var(--red);
}

.status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .16);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.status-online {
    background: rgba(34, 197, 94, .18);
    color: #bbf7d0;
}

.status-offline {
    background: rgba(148, 163, 184, .16);
    color: #e2e8f0;
}

.status-error {
    background: rgba(239, 68, 68, .18);
    color: #fecaca;
}

.status-starting,
.status-stopping {
    background: rgba(245, 158, 11, .18);
    color: #fde68a;
}

.form-card {
    max-width: 980px;
    margin: 0 auto;
}

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

select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: #0b1220;
    color: white;
    outline: none;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

.checks {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 18px 0;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
}

.check input {
    width: auto;
}

.card-link {
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}

.card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, .55);
}

@media (max-width: 800px) {
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

.server-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.copy-btn {
    border: 0;
    border-radius: 10px;
    padding: 6px 9px;
    background: rgba(255,255,255,.08);
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}

.copy-btn:hover {
    background: rgba(255,255,255,.14);
    color: white;
}

.warn {
    color: #fde68a;
    margin-top: 4px;
}

.alert-success {
    background: rgba(34, 197, 94, .16);
    border-color: rgba(34, 197, 94, .34);
    color: #bbf7d0;
}

.service-output {
    max-height: 320px;
    overflow: auto;
    padding: 14px;
    border-radius: 14px;
    background: #020617;
    color: #dbeafe;
    border: 1px solid rgba(255,255,255,.12);
    white-space: pre-wrap;
    font-size: 12px;
}

.alert.alert-success {
    background: rgba(34, 197, 94, .16) !important;
    border-color: rgba(34, 197, 94, .45) !important;
    color: #bbf7d0 !important;
}

.alert.alert-error {
    background: rgba(239, 68, 68, .16) !important;
    border-color: rgba(239, 68, 68, .42) !important;
    color: #fecaca !important;
}

.alert details summary {
    cursor: pointer;
    font-weight: 800;
    margin-top: 8px;
}

.service-output {
    margin-top: 12px;
}

.map-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
}

.map-preview img {
    width: 112px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 12px 30px rgba(0,0,0,.24);
    background: #020617;
}

.map-preview strong {
    display: block;
    color: #ffffff;
    font-size: 14px;
}

.map-preview span {
    display: block;
    color: var(--muted2);
    font-size: 12px;
    margin-top: 3px;
}

@media (max-width: 900px) {
    .map-preview {
        min-width: 180px;
    }

    .map-preview img {
        width: 96px;
        height: 56px;
    }
}

.map-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.map-image-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    overflow: hidden;
}

.map-image-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #020617;
}

.map-image-card-body {
    padding: 16px;
}

.map-image-card-body strong,
.map-image-card-body span,
.map-image-card-body small {
    display: block;
}

.map-image-card-body strong {
    color: #ffffff;
    font-size: 17px;
}

.map-image-card-body span {
    color: var(--muted);
    margin-top: 4px;
}

.map-image-card-body small {
    color: var(--muted2);
    margin-top: 4px;
}

@media (max-width: 1000px) {
    .map-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .map-image-grid {
        grid-template-columns: 1fr;
    }
}

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

@media (max-width: 1000px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.servers-table th,
.servers-table td {
    vertical-align: middle;
}

.server-actions-th {
    min-width: 230px;
}

.service-name {
    display: inline-block;
    max-width: 120px;
    word-break: break-word;
    line-height: 1.25;
}

.server-action-panel-cell {
    width: 250px;
}

.server-action-panel {
    min-width: 230px;
    display: grid;
    gap: 10px;
}

.server-action-group {
    padding: 10px;
    border-radius: 16px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
}

.server-action-group-manage {
    background: rgba(15, 23, 42, .52);
}

.server-action-title {
    color: var(--muted2);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.server-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.server-action-grid form {
    margin: 0;
}

.action-btn {
    width: 100%;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    transition: transform .12s ease, filter .12s ease, background .12s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.action-start {
    background: #2563eb;
}

.action-stop,
.action-delete {
    background: #ef4444;
}

.action-neutral {
    background: #334155;
}

.action-edit {
    background: #475569;
}

@media (max-width: 1100px) {
    .server-action-panel-cell {
        width: 220px;
    }

    .server-action-panel {
        min-width: 210px;
    }
}

@media (max-width: 800px) {
    .server-action-panel-cell {
        width: auto;
    }

    .server-action-panel {
        min-width: 220px;
    }
}

/* ===== SERVER LIST: compact actions + map preview fix ===== */
.servers-table th,
.servers-table td {
    vertical-align: middle;
}

.servers-table td:last-child,
.servers-table th:last-child {
    width: 110px;
    white-space: nowrap;
}

.service-name {
    display: inline-block;
    max-width: 90px;
    word-break: break-word;
    line-height: 1.25;
}

.server-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.map-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
}

.map-thumb {
    width: 112px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    flex-shrink: 0;
}

.map-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.70);
    font-size: 12px;
    font-weight: 800;
}

.map-meta strong {
    display: block;
    margin-bottom: 4px;
}

.map-meta span {
    display: block;
    color: rgba(255,255,255,.68);
    font-size: 12px;
    line-height: 1.35;
}

.server-actions-cell {
    position: relative;
    width: 96px;
}

.server-action-menu {
    position: relative;
}

.server-action-menu > summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    background: #334155;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(255,255,255,.08);
}

.server-action-menu > summary::-webkit-details-marker {
    display: none;
}

.server-action-menu[open] > summary {
    background: #1e293b;
}

.server-action-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 220px;
    padding: 12px;
    border-radius: 16px;
    background: #111c33;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
    z-index: 50;
}

.server-action-title {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.62);
    margin-bottom: 8px;
}

.server-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.server-action-grid form {
    margin: 0;
}

.server-action-btn {
    width: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform .12s ease, filter .12s ease;
}

.server-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.server-action-btn.is-start {
    background: #2563eb;
}

.server-action-btn.is-stop,
.server-action-btn.is-delete {
    background: #ef4444;
}

.server-action-btn.is-neutral {
    background: #334155;
}

.server-action-btn.is-edit {
    background: #475569;
}

@media (max-width: 1200px) {
    .map-cell {
        min-width: 180px;
    }

    .map-thumb {
        width: 96px;
        height: 56px;
    }
}

@media (max-width: 900px) {
    .server-action-dropdown {
        right: auto;
        left: 0;
    }
}

/* ===== Modern server action modal ===== */

.servers-table-modern th,
.servers-table-modern td {
    vertical-align: middle;
}

.servers-table-modern td:last-child,
.servers-table-modern th:last-child {
    width: 130px;
}

.server-map-row-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.server-map-row-preview img,
.server-map-row-empty {
    width: 116px;
    height: 66px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.12);
    background: #020617;
    flex-shrink: 0;
}

.server-map-row-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.72);
    font-size: 12px;
    font-weight: 900;
}

.server-map-row-preview strong {
    display: block;
    color: white;
}

.server-map-row-preview span {
    display: block;
    color: var(--muted2);
    font-size: 12px;
    margin-top: 3px;
}

.manage-server-btn {
    min-width: 112px;
    min-height: 40px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
    transition: transform .14s ease, filter .14s ease;
}

.manage-server-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.server-modal {
    width: min(760px, calc(100vw - 28px));
    max-height: calc(100vh - 44px);
    padding: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 26px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 28px 90px rgba(0,0,0,.62);
    overflow: hidden;
}

.server-modal::backdrop {
    background: rgba(2, 6, 23, .78);
    backdrop-filter: blur(8px);
}

.server-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .22), transparent 38%),
        rgba(15, 23, 42, .94);
}

.server-modal-head h2 {
    margin: 14px 0 6px;
    font-size: 28px;
}

.server-modal-head p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.server-modal-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.server-modal-close:hover {
    background: rgba(255,255,255,.14);
}

.server-modal-body {
    padding: 24px;
    overflow: auto;
    max-height: calc(100vh - 180px);
}

.server-modal-map {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

.server-modal-map img,
.server-modal-map-empty {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.12);
    background: #020617;
}

.server-modal-map-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.72);
    font-weight: 900;
}

.server-modal-map strong {
    display: block;
    font-size: 24px;
}

.server-modal-map span {
    display: block;
    margin-top: 6px;
    color: var(--muted2);
}

.server-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.server-modal-info-grid div,
.server-modal-path {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.08);
}

.server-modal-info-grid span,
.server-modal-path span {
    display: block;
    color: var(--muted2);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 7px;
}

.server-modal-info-grid strong,
.server-modal-path strong {
    display: block;
    color: #ffffff;
    word-break: break-word;
}

.server-modal-path {
    margin-bottom: 20px;
}

.server-modal-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.server-modal-section h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.server-modal-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.server-modal-actions-grid.manage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.server-modal-actions-grid form {
    margin: 0;
}

.modal-action-btn {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .14s ease, filter .14s ease;
}

.modal-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.modal-action-btn.is-start {
    background: #2563eb;
}

.modal-action-btn.is-stop,
.modal-action-btn.is-delete {
    background: #ef4444;
}

.modal-action-btn.is-neutral {
    background: #334155;
}

.modal-action-btn.is-edit {
    background: #475569;
}

@media (max-width: 760px) {
    .server-modal-map,
    .server-modal-info-grid,
    .server-modal-actions-grid,
    .server-modal-actions-grid.manage-grid {
        grid-template-columns: 1fr;
    }

    .server-modal-body {
        max-height: calc(100vh - 150px);
    }
}

.players-count strong {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
}

.players-count span {
    display: block;
    margin-top: 3px;
    color: var(--muted2);
    font-size: 12px;
}

/* ===== Homepage playing now ===== */
.playing-now-card {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    overflow: hidden;
}

.playing-now-image-wrap {
    width: 100%;
}

.playing-now-image-wrap img,
.playing-now-image-empty {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.12);
    background: #020617;
    box-shadow: 0 18px 42px rgba(0,0,0,.28);
}

.playing-now-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.72);
    font-size: 16px;
    font-weight: 900;
}

.playing-now-content h2 {
    margin: 14px 0 14px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1;
}

.playing-now-players {
    margin: 0 0 22px;
}

.playing-now-players strong {
    display: block;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1;
}

.playing-now-players span {
    display: block;
    margin-top: 6px;
    color: var(--muted2);
    font-size: 15px;
    font-weight: 800;
}

.playing-now-connect {
    display: inline-flex;
}

@media (max-width: 850px) {
    .playing-now-card {
        grid-template-columns: 1fr;
    }
}

/* ===== Admin system stats ===== */
.dashboard-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-section-head h2 {
    margin: 14px 0 6px;
    font-size: 30px;
}

.system-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.system-stat-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
}

.system-stat-card span {
    display: block;
    color: var(--muted2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 10px;
}

.system-stat-card strong {
    display: block;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    margin-bottom: 12px;
}

.system-stat-card small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.system-progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    margin: 0 0 12px;
}

.system-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22c55e);
}

.system-note {
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .system-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .dashboard-section-head {
        flex-direction: column;
    }

    .system-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Public homepage system status ===== */
.public-system-card {
    margin-top: 24px;
}

.public-system-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.public-system-head h2 {
    margin: 14px 0 6px;
    font-size: clamp(28px, 4vw, 42px);
}

.public-system-time {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.public-system-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.public-system-item {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
}

.public-system-item span {
    display: block;
    color: var(--muted2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 10px;
}

.public-system-item strong {
    display: block;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    margin-bottom: 12px;
}

.public-system-item small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .public-system-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .public-system-head {
        flex-direction: column;
    }

    .public-system-grid {
        grid-template-columns: 1fr;
    }

    .public-system-time {
        white-space: normal;
    }
}

/* ===== Public linear server load indicator ===== */
.server-load-public {
    margin-top: 24px;
}

.server-load-public-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
}

.server-load-public-head h2 {
    margin: 14px 0 0;
    font-size: clamp(28px, 4vw, 42px);
}

.server-load-public-head strong {
    color: #ffffff;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1;
}

.server-load-bar {
    position: relative;
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e 0%, #eab308 55%, #ef4444 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}

.server-load-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .62);
    transform-origin: right center;
}

.server-load-bar i {
    position: relative;
    z-index: 2;
    display: block;
    height: 100%;
    border-radius: inherit;
    background: rgba(255,255,255,.95);
    box-shadow: 0 0 22px rgba(255,255,255,.32);
}

.server-load-public-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.server-load-public-meta span:first-child {
    color: #ffffff;
}

@media (max-width: 700px) {
    .server-load-public-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .server-load-public-meta {
        flex-direction: column;
    }
}

/* ===== Compact public server load bar ===== */
.server-load-public-compact {
    max-width: 1090px;
    margin: 18px auto 0;
    padding: 20px 24px;
}

.server-load-public-compact .server-load-compact-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 12px;
}

.server-load-public-compact .server-load-mini-label {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .18);
    border: 1px solid rgba(59, 130, 246, .45);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 10px;
}

.server-load-public-compact .server-load-compact-top strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.15;
}

.server-load-public-compact .server-load-compact-top b {
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
}

.server-load-public-compact .server-load-bar {
    height: 12px;
}

.server-load-public-compact .server-load-public-meta {
    margin-top: 10px;
    font-size: 12px;
}

@media (max-width: 700px) {
    .server-load-public-compact {
        padding: 18px;
    }

    .server-load-public-compact .server-load-compact-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .server-load-public-compact .server-load-compact-top b {
        font-size: 28px;
    }
}

/* ===== Fix homepage card spacing ===== */
.server-load-public.server-load-public-compact {
    display: block;
    width: min(100%, 1090px);
    max-width: 1090px;
    margin: 18px auto 34px !important;
    padding: 20px 24px !important;
    position: relative;
    z-index: 1;
}

.playing-now-card {
    margin-top: 0 !important;
    position: relative;
    z-index: 0;
}

.server-load-public-compact + .playing-now-card {
    margin-top: 34px !important;
}

@media (max-width: 850px) {
    .server-load-public.server-load-public-compact {
        margin-bottom: 28px !important;
    }

    .server-load-public-compact + .playing-now-card {
        margin-top: 28px !important;
    }
}

/* ===== Homepage next map ===== */
.next-map-box {
    width: fit-content;
    min-width: 220px;
    margin: 0 0 22px;
    padding: 13px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.10);
}

.next-map-box span {
    display: block;
    color: var(--muted2);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}

.next-map-box strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
}

/* ===== Homepage next map final ===== */
.next-map-box {
    width: fit-content;
    min-width: 220px;
    margin: 0 0 22px;
    padding: 13px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.10);
}

.next-map-box span {
    display: block;
    color: var(--muted2);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}

.next-map-box strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
}

/* ===== Change map form in server modal ===== */
.change-map-form label {
    display: block;
    color: var(--muted2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 8px;
}

.change-map-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 12px;
    align-items: center;
}

.change-map-row select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,.12);
    background: #020617;
    color: #ffffff;
    font-weight: 800;
}

@media (max-width: 700px) {
    .change-map-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Homepage maps list ===== */
.home-maps-section {
    margin-top: 28px;
}

.home-maps-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.home-maps-head h2 {
    margin: 14px 0 6px;
    font-size: clamp(30px, 4vw, 46px);
}

.home-maps-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 11px 15px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.home-maps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-map-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
}

.home-map-card.is-current {
    border-color: rgba(34,197,94,.55);
    box-shadow: 0 0 0 1px rgba(34,197,94,.16);
}

.home-map-card.is-next {
    border-color: rgba(59,130,246,.55);
    box-shadow: 0 0 0 1px rgba(59,130,246,.16);
}

.home-map-image {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.home-map-image img,
.home-map-empty {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.home-map-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.home-map-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2,6,23,.05), rgba(2,6,23,.45));
    pointer-events: none;
}

.home-map-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.home-map-badge.is-current {
    background: rgba(22,163,74,.92);
}

.home-map-badge.is-next {
    background: rgba(37,99,235,.92);
}

.home-map-body {
    padding: 13px 15px 15px;
}

.home-map-body strong {
    display: block;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.2;
}

@media (max-width: 1200px) {
    .home-maps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .home-maps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .home-maps-head {
        flex-direction: column;
    }

    .home-maps-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Admin dashboard modern cards fix ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.container,
main,
.admin-container {
    width: min(100% - 32px, 1200px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.025)),
        rgba(15, 23, 42, .82);
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
}

.card + .card,
section.card + section.card {
    margin-top: 26px;
}

.grid {
    display: grid;
    gap: 22px;
    align-items: stretch;
}

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

.stat-card,
.card-link {
    min-height: 112px;
    padding: 28px;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.stat-card:hover,
.card-link:hover {
    transform: translateY(-3px);
    border-color: rgba(59,130,246,.45);
    background:
        linear-gradient(180deg, rgba(59,130,246,.11), rgba(255,255,255,.025)),
        rgba(15, 23, 42, .88);
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
}

.stat-card span {
    display: block;
    color: #93c5fd;
    font-size: 15px;
    margin-bottom: 10px;
}

.stat-card strong {
    display: block;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.2;
}

.dashboard-section-head {
    margin-bottom: 26px;
}

.system-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.system-stat-card {
    min-width: 0;
    min-height: 150px;
    padding: 22px 20px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
        rgba(30, 41, 59, .72);
    border: 1px solid rgba(148, 163, 184, .18);
    overflow: hidden;
}

.system-stat-card strong {
    font-size: 30px;
    letter-spacing: -.03em;
}

.system-progress {
    height: 9px;
    border-radius: 999px;
    background: rgba(148,163,184,.18);
    overflow: hidden;
}

.system-progress i {
    background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
}

.system-note {
    margin-top: 20px;
    color: rgba(226,232,240,.82);
}

@media (max-width: 1100px) {
    .grid-3,
    .system-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .container,
    main,
    .admin-container {
        width: min(100% - 20px, 1200px);
    }

    .grid-3,
    .system-stats-grid {
        grid-template-columns: 1fr;
    }

    .card {
        border-radius: 16px;
    }

    .stat-card,
    .card-link,
    .system-stat-card {
        padding: 20px;
    }
}

/* ===== Admin dashboard pro polish ===== */
body {
    overflow-x: hidden;
}

main {
    padding-top: 42px;
    padding-bottom: 80px;
}

main > .card:first-child {
    padding: 36px 42px;
    border-radius: 20px;
}

main > .card:first-child h1 {
    margin-top: 18px;
    margin-bottom: 14px;
    font-size: clamp(32px, 4vw, 44px);
    letter-spacing: -.035em;
}

main > .card:first-child p {
    max-width: 760px;
    color: rgba(226,232,240,.86);
}

main > .card:first-child .actions {
    margin-top: 26px;
}

.grid-3 {
    margin-top: 22px;
    margin-bottom: 22px;
    gap: 18px;
}

.grid-3 .stat-card {
    position: relative;
    min-height: 104px;
    padding: 24px 26px;
    border-radius: 18px;
    overflow: hidden;
}

.grid-3 .stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #38bdf8);
    opacity: .75;
}

.grid-3 .stat-card span {
    font-size: 14px;
    color: #93c5fd;
}

.grid-3 .stat-card strong {
    font-size: 23px;
}

section.card:has(.system-stats-grid) {
    padding: 30px;
    border-radius: 20px;
}

.dashboard-section-head {
    align-items: center;
    margin-bottom: 28px;
}

.dashboard-section-head h2 {
    font-size: clamp(30px, 3vw, 38px);
    letter-spacing: -.03em;
}

.dashboard-section-head .btn {
    min-height: 48px;
    padding-inline: 22px;
}

.system-stats-grid {
    gap: 16px;
}

.system-stat-card {
    position: relative;
    padding: 22px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 10% 0%, rgba(59,130,246,.14), transparent 34%),
        rgba(30,41,59,.72);
    border-color: rgba(148,163,184,.20);
}

.system-stat-card span {
    color: #a7b7d6;
}

.system-stat-card strong {
    margin-bottom: 14px;
    font-size: 32px;
}

.system-stat-card small {
    color: rgba(226,232,240,.86);
}

.system-progress {
    height: 10px;
    background: rgba(148,163,184,.20);
}

.system-progress i {
    background: linear-gradient(90deg, #22c55e 0%, #eab308 55%, #ef4444 100%);
}

.system-note {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.08);
    font-size: 14px;
}

@media (max-width: 900px) {
    main {
        padding-top: 24px;
    }

    main > .card:first-child,
    section.card:has(.system-stats-grid) {
        padding: 24px;
    }
}

/* ===== FINAL FIX: Admin dashboard layout / no overlap ===== */
main {
    display: block !important;
}

main > section {
    display: block;
    width: 100%;
    clear: both;
}

main > section.card {
    margin-bottom: 28px !important;
}

main > section.grid.grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    margin: 28px 0 36px 0 !important;
    padding: 0 !important;
    clear: both !important;
    position: relative !important;
    z-index: 1 !important;
}

main > section.grid.grid-3 > .card,
main > section.grid.grid-3 > a.card,
main > section.grid.grid-3 > .stat-card {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 128px !important;
    margin: 0 !important;
    padding: 28px 30px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    position: relative !important;
}

main > section.grid.grid-3 + section.card {
    margin-top: 0 !important;
    clear: both !important;
    position: relative !important;
    z-index: 0 !important;
}

main > section.card:has(.system-stats-grid) {
    margin-top: 0 !important;
    padding: 32px !important;
}

/* Modernější vzhled horních 3 karet */
main > section.grid.grid-3 > .card {
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.15), transparent 38%),
        linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
        rgba(15, 23, 42, .88) !important;
    border: 1px solid rgba(148, 163, 184, .20) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.20) !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

main > section.grid.grid-3 > .card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(59,130,246,.55) !important;
    box-shadow: 0 26px 60px rgba(0,0,0,.30) !important;
}

main > section.grid.grid-3 > .card span {
    display: block !important;
    color: #93c5fd !important;
    font-size: 15px !important;
    margin-bottom: 10px !important;
}

main > section.grid.grid-3 > .card strong {
    display: block !important;
    color: #ffffff !important;
    font-size: 24px !important;
    line-height: 1.15 !important;
}

/* Výkonový panel musí být vždy až pod kartami */
.system-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    margin-top: 28px !important;
}

.system-stat-card {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

/* Responsive */
@media (max-width: 1100px) {
    main > section.grid.grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .system-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    main > section.grid.grid-3 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-bottom: 28px !important;
    }

    main > section.grid.grid-3 > .card {
        min-height: 110px !important;
        padding: 22px !important;
    }

    .system-stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== GAME ZONE clean admin dashboard ===== */
.gz-admin-dashboard {
    width: min(100% - 40px, 1180px);
    margin: 0 auto;
    padding: 38px 0 80px;
}

.gz-admin-dashboard *,
.gz-admin-dashboard *::before,
.gz-admin-dashboard *::after {
    box-sizing: border-box;
}

.gz-admin-hero,
.gz-admin-system,
.gz-admin-shortcut {
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.14), transparent 36%),
        linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
        rgba(15,23,42,.88);
    border: 1px solid rgba(148,163,184,.20);
    box-shadow: 0 22px 55px rgba(0,0,0,.22);
}

.gz-admin-hero {
    padding: 36px;
    border-radius: 22px;
    margin-bottom: 26px;
}

.gz-admin-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(37,99,235,.20);
    border: 1px solid rgba(59,130,246,.55);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 900;
}

.gz-admin-hero h1 {
    margin: 20px 0 12px;
    color: #ffffff;
    font-size: clamp(34px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.gz-admin-hero p,
.gz-admin-system-head p {
    margin: 0;
    color: rgba(226,232,240,.86);
    font-size: 17px;
    line-height: 1.6;
}

.gz-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.gz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    background: rgba(51,65,85,.92);
    border: 1px solid rgba(148,163,184,.16);
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.gz-btn:hover {
    transform: translateY(-2px);
    background: rgba(71,85,105,.95);
    border-color: rgba(148,163,184,.28);
}

.gz-btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-color: rgba(96,165,250,.40);
}

.gz-admin-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0 0 32px;
}

.gz-admin-shortcut {
    display: block;
    min-height: 118px;
    padding: 28px;
    border-radius: 22px;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gz-admin-shortcut::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2563eb, #38bdf8);
    opacity: .8;
}

.gz-admin-shortcut:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,.58);
    box-shadow: 0 28px 70px rgba(0,0,0,.34);
}

.gz-admin-shortcut span {
    display: block;
    color: #93c5fd;
    font-size: 15px;
    margin-bottom: 10px;
}

.gz-admin-shortcut strong {
    display: block;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.15;
}

.gz-admin-system {
    padding: 32px;
    border-radius: 22px;
    margin-top: 0;
    clear: both;
}

.gz-admin-system-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.gz-admin-system-head h2 {
    margin: 18px 0 8px;
    color: #ffffff;
    font-size: clamp(32px, 3.6vw, 42px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.gz-admin-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.gz-admin-metric {
    min-width: 0;
    min-height: 154px;
    padding: 22px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(59,130,246,.12), transparent 38%),
        rgba(30,41,59,.74);
    border: 1px solid rgba(148,163,184,.20);
}

.gz-admin-metric span {
    display: block;
    margin-bottom: 12px;
    color: #a7b7d6;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.gz-admin-metric strong {
    display: block;
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.04em;
}

.gz-admin-metric small {
    display: block;
    color: rgba(226,232,240,.86);
    line-height: 1.45;
}

.gz-admin-progress {
    width: 100%;
    height: 10px;
    margin-bottom: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148,163,184,.20);
}

.gz-admin-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e 0%, #eab308 55%, #ef4444 100%);
}

.gz-admin-note {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(226,232,240,.86);
    font-size: 14px;
}

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

@media (max-width: 720px) {
    .gz-admin-dashboard {
        width: min(100% - 22px, 1180px);
        padding-top: 24px;
    }

    .gz-admin-hero,
    .gz-admin-system {
        padding: 24px;
        border-radius: 18px;
    }

    .gz-admin-shortcuts,
    .gz-admin-metrics {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gz-admin-system-head {
        flex-direction: column;
    }

    .gz-admin-shortcut {
        min-height: 104px;
        padding: 24px;
    }
}

/* ===== AMXX plugin admin ===== */
.plugin-server-select {
    margin-top: 24px;
}

.plugin-server-select label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.plugin-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
}

.plugin-select-row select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: #020617;
    color: #fff;
    font-weight: 800;
}

.plugin-admin-card {
    margin-top: 28px;
}

.plugin-admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

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

.plugin-table {
    width: 100%;
    border-collapse: collapse;
}

.plugin-table th,
.plugin-table td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    text-align: left;
    vertical-align: middle;
}

.plugin-table th {
    color: var(--muted2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.plugin-table td strong {
    display: block;
    color: #fff;
}

.plugin-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted2);
}

.plugin-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(148,163,184,.14);
    border: 1px solid rgba(148,163,184,.18);
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 900;
}

.plugin-pill.enabled,
.plugin-pill.ok {
    background: rgba(34,197,94,.14);
    border-color: rgba(34,197,94,.32);
    color: #bbf7d0;
}

.plugin-pill.disabled {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.28);
    color: #fecaca;
}

.plugin-pill.error {
    background: rgba(239,68,68,.16);
    border-color: rgba(239,68,68,.36);
    color: #fecaca;
}

.plugin-pill.protected {
    background: rgba(59,130,246,.14);
    border-color: rgba(59,130,246,.34);
    color: #bfdbfe;
}

.plugin-table form {
    margin: 0;
}

.plugin-table button[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 700px) {
    .plugin-select-row,
    .plugin-admin-head {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

/* ===== AMXX plugin cards modern UI ===== */
.plugin-path {
    word-break: break-all;
}

.plugin-head-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.plugin-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0 24px;
}

.plugin-summary > div {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
}

.plugin-summary span {
    display: block;
    color: var(--muted2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.plugin-summary strong {
    color: #fff;
    font-size: 30px;
    line-height: 1;
}

.plugin-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.plugin-card {
    min-width: 0;
    padding: 18px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.11), transparent 34%),
        rgba(15,23,42,.78);
    border: 1px solid rgba(148,163,184,.18);
    box-shadow: 0 18px 45px rgba(0,0,0,.14);
}

.plugin-card.is-enabled {
    border-color: rgba(34,197,94,.24);
}

.plugin-card.is-disabled {
    border-color: rgba(239,68,68,.22);
    opacity: .92;
}

.plugin-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.plugin-card-top strong {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.2;
    word-break: break-word;
}

.plugin-card-top small {
    display: block;
    margin-top: 6px;
    color: var(--muted2);
    font-size: 13px;
}

.plugin-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.plugin-card-action {
    display: flex;
}

.plugin-card-action form,
.plugin-card-action button,
.plugin-card-action .btn {
    width: 100%;
}

.plugin-card-action .btn {
    min-height: 44px;
}

.plugin-pill {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .plugin-card-grid,
    .plugin-summary {
        grid-template-columns: 1fr;
    }

    .plugin-admin-head {
        flex-direction: column;
    }
}
