:root {
  --bg: #18191c;
  --panel: #23242a;
  --panel-light: #282a32;
  --primary: #e74c3c;
  --accent: #21d4fd;
  --text: #f7f7f7;
  --text-dim: #bbb;
  --border: #292a2e;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(0,0,0,0.18);
  --font-main: 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 2em 0 1em 0;
  text-align: center;
}
header h1 {
  font-size: 1.6em;
  letter-spacing: 1px;
  font-weight: 700;
  margin: 0;
}
header p {
  color: var(--text-dim);
  margin-top: 0.7em;
  font-size: 1.2em;
}
#main-wrap {
  display: flex;
  flex: 1 1 auto;
  max-width: 1700px;
  width: 100%;
  margin: 0 auto;
  padding: 2em 1em 2em 1em;
  gap: 2em;
  align-items: flex-start;
}
/* --- STAŁA SZEROKOŚĆ PANELU BOCZNEGO --- */
aside {
  flex: 0 0 850px;
  min-width: 850px;
  max-width: 850px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}
main {
  min-width: 500px !important;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}
.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5em 1.5em 1em 1.5em;
  margin-bottom: 0.5em;
  min-width: 0;
}
.panel h2 {
  font-size: 1.18em;
  color: var(--accent);
  margin-bottom: 1em;
  letter-spacing: .2px;
}
#dash {
  background: #16171a;
  border-radius: 40% 40% 50px 50px ;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.dashboard {
  background: var(--panel-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3em 1.1em;
  text-align: center;
  margin-bottom: 1.5em;
  overflow-x: auto;
}
.tables, .proc-list, .logs, .chart {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3em 1.1em;
  margin-bottom: 0.2em;
  min-width: 0;
}
.tables h2, .proc-list h2, .logs h2, .chart h2 {
  color: var(--accent);
  margin-bottom: 0.8em;
  font-size: 1.12em;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  margin-bottom: 1em;
}
th, td {
  padding: 0.6em 0.7em;
  border: none;
  text-align: left;
  font-size: 1em;
  background: transparent;
}
th {
  background: #202126;
  color: var(--accent);
  font-weight: 600;
  border-radius: 6px 6px 0 0;
}
tr:nth-child(even) td {
  background: #212227;
}
tr:nth-child(odd) td {
  background: #191a1d;
}
tr:first-child td { border-top: none; }
.tables table { margin-bottom: 1.5em; }
.logs pre, .log-output {
  background: #191a1d;
  color: #ebebeb;
  border-radius: 8px;
  padding: 1em;
  max-height: 330px;
  overflow: auto;
  font-size: 0.98em;
  margin-bottom: 0.6em;
}
.proc-list pre {
  background: #141517;
  color: #90ee90;
  border-radius: 8px;
  padding: 1em;
  max-height: 280px;
  overflow: auto;
  font-size: 0.96em;
}
.chart canvas {
  margin-bottom: 1em;
  border-radius: 12px;
  background: #16171a;
  width: 100%;
  height: auto;
  display: block;
}
footer {
  background: var(--panel);
  text-align: center;
  padding: 1em 0;
  color: var(--text-dim);
  font-size: 1em;
  letter-spacing: 1px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.time .hours  { font-size: 1em; }
.time .minutes{ font-size: 0.9em; }
.time .seconds{ font-size: 0.7em; }

::-webkit-scrollbar {
  width: 10px;
  background: #18191c;
}
::-webkit-scrollbar-thumb {
  background: #24252a;
  border-radius: 6px;
}

/* --- RESPONSYWNOŚĆ NA MOBILE --- */
@media (max-width: 1100px) {
  #main-wrap {
    flex-direction: column;
    gap: 1.5em;
    padding: 1em 0.3em;
  }
  aside, main {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
  }
  aside {
    flex: 0 0 100vw;
    min-width: 0;
    max-width: 100vw;
  }
  #dash { max-width: 100vw; }
  .players-mobile { display: block !important; }
  .players-desktop { display: none !important; }
}
@media (max-width: 700px) {
  #main-wrap { padding: 0.6em 0; }
  .panel, .dashboard, .tables, .proc-list, .logs, .chart {
    padding: 0.7em 0.3em;
    font-size: 0.99em;
  }
  th, td { font-size: 0.95em; padding: 0.4em 0.3em; }
}

.players-mobile { display: none; }
.players-desktop { display: block; }
