:root {
    --bg-base: #09090b;
    --panel-bg: rgba(24, 24, 29, 0.82);
    --panel-hover: rgba(32, 32, 40, 0.92);
    --panel-border: rgba(255, 255, 255, 0.14);
    --panel-border-strong: rgba(59, 130, 246, 0.5);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --status-on: #22c55e;
    --status-warn: #f59e0b;
    --status-off: #ef4444;
    --panel-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

body {
    margin: 0; padding: 0;
    background-color: var(--bg-base);
    background-image:
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.22), transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(239, 68, 68, 0.18), transparent 55%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.mono { font-family: 'JetBrains Mono', monospace; }
.text-xs { font-size: 0.75rem; }

/* NAVIGACE */
nav {
    width: 100%;
    background: rgba(15, 15, 18, 0.88);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    display: flex; justify-content: center;
    position: sticky; top: 0; z-index: 100;
}
.nav-content {
    width: 100%; max-width: 1180px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 28px;
}
.nav-left { display: flex; align-items: center; gap: 8px; }
.nav-logo { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.5px; color: var(--text-main); }
.nav-logo:hover { opacity: 0.8; }
.nav-slash { color: var(--text-dim); font-family: 'JetBrains Mono', monospace; }
.nav-section {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem; font-weight: 700; color: var(--accent-blue);
}
.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    font-weight: 600; font-size: 0.85rem;
    padding: 8px 14px; border-radius: 8px;
    transition: all 0.2s ease;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); transform: translateY(-1px); }

.icon-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    border: none; color: #fff; font-family: 'Inter', sans-serif; font-weight: 700;
    padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.discord-login-btn, .discord-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #5865F2; color: #fff; font-weight: 600; font-size: 0.85rem;
    padding: 8px 15px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s ease;
}
.discord-login-btn:hover, .discord-btn:hover { background: #4752C4; transform: translateY(-1px); }

.user-bar, .user-pill {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--panel-border);
    padding: 5px 10px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600;
}
.user-bar img, .user-pill img { width: 22px; height: 22px; border-radius: 50%; }

.btn-logout, .logout-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5; font-size: 0.78rem; font-weight: 600;
    padding: 5px 10px; border-radius: 6px; cursor: pointer;
    transition: all 0.15s ease;
}
.btn-logout:hover, .logout-btn:hover { background: var(--accent-red); color: #fff; }

/* KONTEJNER */
.container {
    width: 100%; max-width: 1180px;
    padding: 36px 28px 60px 28px;
}

.page-head {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 16px; margin-bottom: 26px;
    flex-wrap: wrap; gap: 12px;
}
.page-head-left { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.summary-stats { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-muted); }
.page-head-right {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-muted);
    background: rgba(255,255,255,0.04); border: 1px solid var(--panel-border);
    padding: 5px 12px; border-radius: 999px;
}
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-on); box-shadow: 0 0 8px var(--status-on); }

/* MŘÍŽKA SERVERŮ + SKLENĚNÉ KARTY */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.srv-card, .server-card {
    background: var(--panel-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
    box-shadow: var(--panel-shadow);
    transition: all 0.25s ease;
    position: relative;
}
.srv-card.status-border-online { border-top: 3px solid var(--status-on); }
.srv-card.status-border-offline { border-top: 3px solid rgba(255, 255, 255, 0.2); }
.srv-card.status-border-starting,
.srv-card.status-border-backoff { border-top: 3px solid var(--status-warn); }
.srv-card.status-border-failed { border-top: 3px solid var(--status-off); }

.srv-card.can-open, .server-card.clickable { cursor: pointer; }
.srv-card.can-open:hover, .server-card.clickable:hover {
    background: var(--panel-hover);
    border-color: var(--panel-border-strong);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
}

.srv-card.is-locked, .server-card.locked-card {
    opacity: 0.45;
    filter: grayscale(40%);
}

.srv-head, .sc-top {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.srv-title-group { display: flex; flex-direction: column; gap: 5px; }
.srv-id-line { display: flex; align-items: center; gap: 8px; }
.mono-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem; font-weight: 600;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.35);
    padding: 2px 7px; border-radius: 5px;
}
.srv-name, .sc-title { font-size: 1.18rem; font-weight: 800; color: #fff; margin: 0; }
.srv-ver, .sc-version { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-muted); }

/* STATUS ODZNAK */
.st-pill, .status-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem; font-weight: 700;
    padding: 5px 10px; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    white-space: nowrap;
}
.st-dot { width: 8px; height: 8px; border-radius: 50%; }
.st-online, .status-online { color: #4ade80; background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); }
.st-online .st-dot { background: var(--status-on); box-shadow: 0 0 8px var(--status-on); }
.st-offline, .status-offline { color: #f87171; background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.st-offline .st-dot { background: var(--status-off); }
.st-starting, .st-backoff, .status-starting, .status-backoff { color: #fbbf24; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }
.st-starting .st-dot, .st-backoff .st-dot { background: var(--status-warn); box-shadow: 0 0 8px var(--status-warn); }

/* BOX S IP ADRESOU */
.srv-addr-bar, .sc-address-box {
    background: rgba(9, 9, 11, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 13px;
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    cursor: pointer; transition: all 0.2s ease;
}
.srv-addr-bar:hover, .sc-address-box:hover {
    border-color: var(--accent-blue);
    background: rgba(9, 9, 11, 0.95);
}
.srv-addr-val, .sc-addr-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.83rem; color: #e4e4e7;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.srv-copy-tag, .copy-chip {
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.73rem; font-weight: 600;
    padding: 4px 9px; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 5px;
    flex-shrink: 0; cursor: pointer;
}
.srv-addr-bar:hover .srv-copy-tag, .copy-chip:hover {
    background: var(--accent-blue); color: #fff;
}

/* PATIČKA KARTY */
.srv-motd, .sc-motd {
    font-size: 0.82rem; color: #d4d4d8;
    background: rgba(255,255,255,0.03);
    padding: 6px 10px; border-radius: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.srv-foot, .sc-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.83rem;
}
.srv-players { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-muted); }
.srv-players strong { color: #fff; }
.srv-action-label, .open-panel-link { font-weight: 700; color: var(--accent-blue); transition: color 0.2s; }
.srv-card.can-open:hover .srv-action-label,
.server-card.clickable:hover .open-panel-link { color: var(--accent-red); }
.srv-locked-label, .no-access-tag { font-size: 0.78rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 5px; }

/* DETAIL SERVERU (WORKSPACE) */
.detail-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 16px; margin-bottom: 22px;
    border-bottom: 1px solid var(--panel-border);
    flex-wrap: wrap; gap: 12px;
}
.back-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--text-main); font-family: 'Inter', sans-serif;
    font-size: 0.85rem; font-weight: 600;
    padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.back-btn:hover { background: rgba(255, 255, 255, 0.1); }
.detail-bar-title { display: flex; align-items: center; gap: 12px; }
.detail-bar-title h2 { margin: 0; font-size: 1.4rem; font-weight: 800; }

.workspace-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 20px;
    align-items: start;
}

.ws-sidebar { display: flex; flex-direction: column; gap: 18px; }
.ctrl-group {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--panel-shadow);
    display: flex; flex-direction: column; gap: 14px;
}
.group-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.73rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-muted);
}

.power-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pwr-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 6px; border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    color: var(--text-main); font-family: 'Inter', sans-serif;
    font-size: 0.8rem; font-weight: 700;
    cursor: pointer; transition: all 0.15s ease;
}
.pwr-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pwr-start:not(:disabled):hover { background: rgba(34, 197, 94, 0.18); border-color: var(--status-on); color: #4ade80; }
.pwr-stop:not(:disabled):hover { background: rgba(239, 68, 68, 0.18); border-color: var(--status-off); color: #f87171; }
.pwr-restart:not(:disabled):hover { background: rgba(59, 130, 246, 0.18); border-color: var(--accent-blue); color: #93c5fd; }

.watchdog-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wd-info { display: flex; flex-direction: column; gap: 3px; }
.wd-name { font-size: 0.85rem; font-weight: 700; }
.wd-sub { font-size: 0.73rem; color: var(--text-muted); }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; inset: 0;
    background-color: rgba(255, 255, 255, 0.16); border-radius: 24px; transition: 0.2s;
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: #fff; border-radius: 50%; transition: 0.2s;
}
input:checked + .slider { background: var(--accent-blue); }
input:checked + .slider:before { transform: translateX(18px); }

.kv-table { display: flex; flex-direction: column; gap: 10px; }
.kv-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    font-size: 0.82rem; padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.kv-row:last-child { border-bottom: none; padding-bottom: 0; }
.kv-key { color: var(--text-muted); flex-shrink: 0; }
.kv-val { color: var(--text-main); text-align: right; word-break: break-all; }
.copy-link { color: var(--accent-blue); cursor: pointer; }
.copy-link:hover { text-decoration: underline; }

/* TERMINÁL */
.ws-terminal {
    background: #060609;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    box-shadow: var(--panel-shadow);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.term-header {
    background: rgba(20, 20, 25, 0.95);
    border-bottom: 1px solid var(--panel-border);
    padding: 12px 18px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.term-path { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-muted); }
.term-actions { display: flex; align-items: center; gap: 14px; }
.autoscroll-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: var(--text-muted); cursor: pointer;
}
.term-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--panel-border);
    color: var(--text-main); font-size: 0.78rem; font-weight: 600;
    padding: 5px 12px; border-radius: 6px; cursor: pointer;
}
.term-btn:hover { background: rgba(255, 255, 255, 0.12); }

.term-body {
    height: 520px;
    overflow-y: auto;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.79rem;
    line-height: 1.55;
    color: #d4d4d8;
}
.log-line { white-space: pre-wrap; word-break: break-word; padding: 1px 0; }
.log-warn { color: #fde047; background: rgba(250, 204, 21, 0.06); }
.log-err { color: #fca5a5; background: rgba(239, 68, 68, 0.1); }
.log-dim { color: #71717a; }

/* ADMIN ACL PANEL */
.admin-panel {
    margin-top: 42px;
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px; padding: 24px;
    box-shadow: var(--panel-shadow);
}
.admin-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 16px;
}
.admin-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.admin-hint { font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; color: var(--text-muted); }
.admin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.admin-form input[type="text"] {
    background: rgba(9, 9, 11, 0.85); border: 1px solid var(--panel-border);
    color: var(--text-main); padding: 9px 13px; border-radius: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; min-width: 220px;
}
.adm-checkboxes { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-cb-label {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
    padding: 7px 12px; border-radius: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; cursor: pointer;
}
.btn-primary, .action-btn {
    background: var(--accent-blue); color: #fff; border: none;
    padding: 9px 16px; border-radius: 8px; font-weight: 700; font-size: 0.84rem; cursor: pointer;
}
.btn-primary:hover, .action-btn:hover { filter: brightness(1.12); }
.admin-users-list { display: flex; flex-direction: column; gap: 8px; }
.adm-user-row {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(9, 9, 11, 0.65); border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px; border-radius: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
}

/* TOAST */
#toast {
    visibility: hidden;
    background: #141419; color: var(--text-main);
    border: 1px solid var(--panel-border-strong);
    border-left: 4px solid var(--accent-blue);
    border-radius: 8px; padding: 12px 18px;
    position: fixed; z-index: 999; bottom: 24px; right: 24px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.82rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
    opacity: 0; transform: translateY(8px);
    transition: all 0.2s ease;
}
#toast.show { visibility: visible; opacity: 1; transform: translateY(0); }

@media (max-width: 860px) {
    .workspace-grid { grid-template-columns: 1fr; }
    .nav-content, .container { padding-left: 16px; padding-right: 16px; }
}

/* ROZŠÍŘENÍ PRO KONZOLI A ACL SKUPINY */
.workspace-grid.no-console {
    grid-template-columns: minmax(320px, 460px);
    justify-content: center;
}

.term-input-row {
    display: flex;
    align-items: center;
    background: rgba(14, 14, 18, 0.98);
    border-top: 1px solid var(--panel-border);
    padding: 10px 14px;
    gap: 10px;
}
.term-prompt {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.95rem;
}
#consoleCmdInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    padding: 9px 12px;
    border-radius: 7px;
    outline: none;
}
#consoleCmdInput:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.07);
}
.term-send-btn {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 9px 16px;
    border-radius: 7px;
    cursor: pointer;
    transition: filter 0.15s;
}
.term-send-btn:hover { filter: brightness(1.15); }

.admin-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}
.admin-inputs-row, .admin-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.adm-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(9, 9, 11, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 6px 12px;
    border-radius: 10px;
}
.adm-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* ROZŠÍŘENÍ PRO KONZOLI A ACL SKUPINY */
.workspace-grid.no-console {
    grid-template-columns: minmax(320px, 460px);
    justify-content: center;
}

.term-input-row {
    display: flex;
    align-items: center;
    background: rgba(14, 14, 18, 0.98);
    border-top: 1px solid var(--panel-border);
    padding: 10px 14px;
    gap: 10px;
}
.term-prompt {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.95rem;
}
#consoleCmdInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    padding: 9px 12px;
    border-radius: 7px;
    outline: none;
}
#consoleCmdInput:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.07);
}
.term-send-btn {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 9px 16px;
    border-radius: 7px;
    cursor: pointer;
    transition: filter 0.15s;
}
.term-send-btn:hover { filter: brightness(1.15); }

.admin-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}
.admin-inputs-row, .admin-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.adm-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(9, 9, 11, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 6px 12px;
    border-radius: 10px;
}
.adm-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* === NOVÉ PRVKY: ZÁLOŽKY, STATISTIKY, MODPACK, GRAFY === */
.ws-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.tabs-bar {
    display: flex;
    gap: 8px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 6px;
    border-radius: 12px;
    flex-wrap: wrap;
}
.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.tab-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.04); }
.tab-btn.active {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.45);
    color: #fff;
}

.live-pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--status-on);
    box-shadow: 0 0 8px var(--status-on);
}
.sse-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem; font-weight: 700;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.35);
    padding: 2px 7px; border-radius: 4px;
    margin-left: 10px;
}

.pane-card {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--panel-shadow);
    margin-bottom: 16px;
}
.pane-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.pane-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.pane-sub { font-size: 0.78rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* ŽEBŘÍČEK HRÁČŮ */
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
    display: grid;
    grid-template-columns: 38px 34px 1fr auto;
    align-items: center;
    gap: 12px;
    background: rgba(9, 9, 11, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 14px;
    border-radius: 10px;
}
.lb-rank {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800; font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
}
.lb-row:nth-child(1) .lb-rank { color: #facc15; }
.lb-row:nth-child(2) .lb-rank { color: #e4e4e7; }
.lb-row:nth-child(3) .lb-rank { color: #d97706; }
.lb-avatar { width: 28px; height: 28px; border-radius: 5px; image-rendering: pixelated; }
.lb-name { font-weight: 700; font-size: 0.92rem; color: #fff; }
.lb-sub { font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.lb-hours {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700; font-size: 0.9rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 5px 10px; border-radius: 7px;
}

/* MODPACK TLAČÍTKA (CURSEFORGE / MODRINTH) */
.modpack-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(135deg, rgba(24, 24, 30, 0.9), rgba(59, 130, 246, 0.12));
}
.mp-info h3 { margin: 6px 0 4px 0; font-size: 1.2rem; font-weight: 800; }
.mp-info p { margin: 0; font-size: 0.84rem; color: var(--text-muted); }
.mp-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-cf, .btn-mr {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 0.82rem;
    padding: 9px 15px; border-radius: 8px;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-cf {
    background: rgba(241, 100, 54, 0.18);
    border: 1px solid rgba(241, 100, 54, 0.5);
    color: #fdba74;
}
.btn-cf:hover { background: #f16436; color: #fff; transform: translateY(-1px); }
.btn-mr {
    background: rgba(27, 217, 106, 0.16);
    border: 1px solid rgba(27, 217, 106, 0.45);
    color: #86efac;
}
.btn-mr:hover { background: #1bd96a; color: #052e16; transform: translateY(-1px); }

.card-mp-badges {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.card-mp-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem; font-weight: 600;
    padding: 4px 9px; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 5px;
}

/* TIER 3 EDITOR & UPLOAD */
.mp-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.mp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}
.mp-form-grid label {
    display: block; font-size: 0.75rem; color: var(--text-muted);
    margin-bottom: 5px; font-weight: 600;
}
.mp-form-grid input {
    width: 100%; background: #060608; border: 1px solid var(--panel-border);
    color: #fff; padding: 9px 12px; border-radius: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
}

.upload-zone {
    border: 2px dashed rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.12);
}
.upload-content { display: flex; flex-direction: column; gap: 4px; }
.upload-content strong { font-size: 0.92rem; color: #93c5fd; }
.upload-content span { font-size: 0.78rem; color: var(--text-muted); }
.upload-progress { margin-top: 10px; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #4ade80; }

/* SEZNAM MODŮ */
.search-input {
    background: #060608; border: 1px solid var(--panel-border);
    color: #fff; padding: 7px 12px; border-radius: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
    min-width: 220px;
}
.mods-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
}
.mod-item {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    background: rgba(9, 9, 11, 0.65);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 8px 12px; border-radius: 8px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.76rem;
}
.mod-fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e4e4e7; }
.mod-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--text-dim); }
.mod-del-btn {
    background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5; border-radius: 5px; padding: 2px 7px; cursor: pointer; font-size: 0.72rem;
}
.mod-del-btn:hover { background: var(--accent-red); color: #fff; }

/* PLÁNOVANÝ RESTART INPUT */
.sched-controls { display: flex; align-items: center; gap: 8px; }
.time-input {
    background: #060608; border: 1px solid var(--panel-border);
    color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
    padding: 4px 7px; border-radius: 6px;
}

/* GRAFY */
.chart-wrap {
    background: #060609;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 14px;
}
.chart-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem; color: var(--text-muted);
    margin-bottom: 8px;
}
canvas { width: 100%; height: auto; display: block; }
.sidebar-mp-links { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* === VYLEPŠENÍ PRO GRAFY, RYCHLÉ PŘÍKAZY A MOBILY === */
.chart-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.chart-hover-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 3px 10px;
    border-radius: 6px;
}
.canvas-holder {
    position: relative;
    width: 100%;
    height: 220px;
}
.canvas-holder canvas {
    width: 100% !important;
    height: 100% !important;
    cursor: crosshair;
    touch-action: pan-y;
}

/* Rychlé příkazy nad inputem konzole */
.quick-cmd-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(10, 10, 14, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    white-space: nowrap;
}
.chip-lbl {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    margin-right: 4px;
}
.cmd-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: #d4d4d8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.73rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.cmd-chip:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
    color: #fff;
}

/* Právě online hráči */
.online-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.online-player-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.35);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}
.online-player-pill img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    image-rendering: pixelated;
}

/* KOMPLETNÍ RESPONZIVITA PRO MOBILY A TABLETY */
@media (max-width: 960px) {
    .workspace-grid {
        grid-template-columns: 1fr !important;
    }
    .servers-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .nav-content {
        padding: 10px 14px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    .nav-right {
        gap: 6px;
    }
    .nav-btn, .discord-login-btn, .icon-btn {
        padding: 6px 10px;
        font-size: 0.78rem;
    }
    .container {
        padding: 20px 12px 45px 12px;
    }
    .page-head h1 {
        font-size: 1.3rem;
    }
    .servers-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .srv-card {
        padding: 16px;
    }
    .tabs-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 5px;
    }
    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .term-body {
        height: 360px;
        font-size: 0.73rem;
        padding: 10px;
    }
    .term-input-row {
        padding: 8px;
        gap: 6px;
    }
    #consoleCmdInput {
        font-size: 16px; /* Zabrání nechtěnému zoomu na iOS/Androidu */
        padding: 8px 10px;
    }
    .lb-row {
        grid-template-columns: 30px 28px 1fr auto;
        gap: 8px;
        padding: 8px 10px;
    }
    .lb-name { font-size: 0.84rem; }
    .lb-sub { font-size: 0.68rem; }
    .lb-hours { font-size: 0.78rem; padding: 4px 7px; }
    .adm-user-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .adm-group {
        width: 100%;
        flex-wrap: wrap;
    }
    .admin-inputs-row input {
        width: 100%;
        min-width: 0 !important;
    }
    .canvas-holder {
        height: 185px;
    }
}

/* === HROMADNÉ MAZÁNÍ MODŮ & SPRÁVA SVĚTA === */
.mods-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bulk-mod-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-bulk-del {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-bulk-del:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.btn-bulk-del:not(:disabled):hover {
    background: var(--accent-red);
    color: #fff;
}

.mod-item {
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s, background 0.15s;
}
.mod-item.mod-selected {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.5);
}
.mod-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}
.mod-cb {
    width: 15px;
    height: 15px;
    accent-color: var(--accent-blue);
    cursor: pointer;
    flex-shrink: 0;
}

/* Správa světa (Download & Wipe) */
.world-actions-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-world-dl, .btn-world-del {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 10px 16px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-world-dl {
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: #93c5fd;
}
.btn-world-dl:hover {
    background: var(--accent-blue);
    color: #fff;
    transform: translateY(-1px);
}
.btn-world-del {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.btn-world-del:hover {
    background: var(--accent-red);
    color: #fff;
    transform: translateY(-1px);
}
