:root {
  --bg: #0a1020;
  --bg-2: #0f1730;
  --sidebar: #0d1530;
  --card: #111b37;
  --card-2: #152245;
  --line: rgba(255,255,255,0.08);
  --text: #ecf2ff;
  --muted: #90a0c0;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow: 0 20px 45px rgba(0,0,0,0.28);
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(37,99,235,0.12), transparent 18%),
    linear-gradient(135deg, #09101f 0%, #0d1833 100%);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.login-shell {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: center;
}

.login-left {
  padding: 24px 10px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(59,130,246,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}

.login-brand-overline {
  color: #9eb1d4;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
}

.login-brand-title {
  font-size: 2rem;
  font-weight: 800;
}

.login-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 16px;
  background: rgba(59,130,246,0.16);
  border: 1px solid rgba(59,130,246,0.28);
  color: #cfe0ff;
  font-weight: 700;
  margin-bottom: 20px;
}

.login-heading {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.05;
  max-width: 720px;
  margin-bottom: 18px;
}

.login-text {
  color: #a7b6d2;
  font-size: 1.14rem;
  line-height: 1.7;
  max-width: 650px;
  margin-bottom: 28px;
}

.login-feature-list {
  display: grid;
  gap: 14px;
  max-width: 620px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbe6ff;
  font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px 18px;
}

.login-feature i {
  color: #66a3ff;
  font-size: 1.1rem;
}

.login-right {
  display: flex;
  justify-content: center;
}

.login-card-pro {
  width: 100%;
  max-width: 470px;
  background: rgba(255,255,255,0.98);
  color: #17233d;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
  padding: 38px;
  border: 1px solid rgba(255,255,255,0.7);
}

.login-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(88,101,242,0.12);
  color: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.login-card-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.login-card-text {
  color: #62728f;
  font-size: 1.03rem;
  line-height: 1.7;
  margin-bottom: 22px;
}

.btn-discord-pro {
  min-height: 54px;
  border-radius: 16px;
  font-weight: 800;
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}

.btn-discord-pro:hover {
  background: #4752c4;
  border-color: #4752c4;
  color: #fff;
}

.admin-page {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, rgba(12,21,47,0.98) 0%, rgba(9,16,34,0.98) 100%);
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 8px 16px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(59,130,246,0.26), rgba(59,130,246,0.08));
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}

.brand-overline {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .74rem;
  margin-bottom: 4px;
}

.brand-title {
  font-size: 1.95rem;
  font-weight: 900;
  line-height: 1.05;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-caption {
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 0 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d9e7ff;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  transition: all .18s ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(59,130,246,0.18), rgba(59,130,246,0.11));
  border-color: rgba(59,130,246,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.user-card {
  margin-top: auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
}

.user-name {
  font-weight: 800;
}

.user-role {
  color: var(--muted);
  font-size: .95rem;
}

.logout-btn {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ff8b98;
  text-decoration: none;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  font-weight: 700;
}

.logout-btn:hover {
  color: #ff9ca7;
  background: rgba(255,255,255,0.04);
}

.content-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 90px;
  padding: 24px 34px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(9,16,32,0.42);
  backdrop-filter: blur(10px);
}

.topbar-title {
  font-size: 2.3rem;
  font-weight: 900;
  margin: 0 0 4px;
}

.topbar-subtitle {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}

.page-wrap {
  padding: 34px;
}

.panel-card {
  background: linear-gradient(180deg, rgba(17,27,55,0.96) 0%, rgba(13,22,45,0.96) 100%);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  padding: 24px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-title {
  font-size: 1.5rem;
  font-weight: 850;
  margin: 0;
}

.panel-subtitle {
  color: var(--muted);
  margin: 4px 0 0;
}

.stats-card {
  background: linear-gradient(180deg, rgba(18,29,59,0.97) 0%, rgba(14,24,48,0.97) 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.stats-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(59,130,246,0.12);
}

.stats-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(59,130,246,0.14);
  color: #74adff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.stats-label {
  color: var(--muted);
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: 6px;
}

.stats-value {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.status-list {
  padding: 6px 24px 24px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.status-item:last-of-type {
  border-bottom: none;
}

.status-name {
  font-weight: 800;
}

.status-desc {
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
}

.setup-note {
  margin-top: 18px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.18);
  color: #d5e6ff;
  border-radius: 18px;
  padding: 16px;
  line-height: 1.65;
}

.form-wrap {
  padding: 0 24px 24px;
}

.panel-input,
.panel-input:focus {
  min-height: 52px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  color: #fff;
  box-shadow: none;
}

.panel-input::placeholder {
  color: #93a4c5;
}

.panel-input option {
  color: #111827;
}

.btn-primary {
  min-height: 52px;
  border-radius: 16px;
  font-weight: 800;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border: none;
  box-shadow: 0 14px 28px rgba(37,99,235,0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #4a90ff, #2b6fed);
}

.table-responsive {
  background: transparent !important;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(255,255,255,0.06);
  margin-bottom: 0;
}

.panel-table {
  width: 100%;
  color: var(--text);
  background: transparent !important;
  border-collapse: separate;
  border-spacing: 0;
}

.panel-table thead,
.panel-table tbody,
.panel-table tr,
.panel-table td,
.panel-table th {
  background: transparent;
}

.panel-table thead th {
  border-color: rgba(255,255,255,0.06);
  color: #fff;
  padding: 16px 18px;
  font-weight: 800;
  white-space: nowrap;
}

.panel-table tbody td {
  border-color: rgba(255,255,255,0.06);
  padding: 16px 18px;
  vertical-align: middle;
}

.panel-table tbody tr:hover {
  background: rgba(59,130,246,0.12);
}

.text-secondary {
  color: var(--muted) !important;
}

.players-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: 100%;
  flex-wrap: wrap;
}

.players-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.players-select {
  min-width: 180px;
  width: 180px;
}

.players-filter-btn {
  min-width: 130px;
  height: 52px;
  white-space: nowrap;
}

.players-search {
  width: 340px;
  min-width: 260px;
}

@media (max-width: 991.98px) {
  .players-toolbar {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .players-filter-form {
    width: 100%;
  }

  .players-select,
  .players-filter-btn,
  .players-search {
    width: 100%;
    min-width: 100%;
  }
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8fa3c7;
  pointer-events: none;
  z-index: 2;
}

.search-box .panel-input {
  padding-left: 44px;
}

.player-link {
  color: #ffffff;
  text-decoration: none;
}

.player-link:hover {
  color: #8db7ff;
  text-decoration: underline;
}

.stats-money {
  font-size: 2.2rem;
}

.info-card {
  height: 100%;
}

.detail-list {
  padding: 0 24px 24px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  text-align: right;
  word-break: break-word;
}

.meta-grid {
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.meta-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 18px;
}

.meta-label {
  color: var(--muted);
  margin-bottom: 8px;
}

.meta-value {
  font-size: 1.65rem;
  font-weight: 800;
}

.meta-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255,255,255,0.04);
  color: #dfe8ff;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.82rem;
  max-width: 100%;
  max-height: 180px;
  overflow: auto;
}

/* Players table darker and clearer */
.panel-table-players {
  background: transparent !important;
}

.panel-table-players thead th {
  background: #162448 !important;
  color: #f8fbff !important;
}

.panel-table-players tbody {
  background: transparent !important;
}

.panel-table-players tbody tr {
  background: #0f1a36 !important;
}

.panel-table-players tbody tr:nth-child(even) {
  background: #101d3d !important;
}

.panel-table-players tbody tr:hover {
  background: rgba(59,130,246,0.16) !important;
}

.panel-table-players tbody td {
  color: #eef4ff !important;
}

.panel-table-players .player-subname {
  color: #9fb2d7 !important;
}

.panel-table-players .player-link {
  color: #ffffff !important;
  font-size: 1.05rem;
}

.panel-table-players .player-link:hover {
  color: #9ec2ff !important;
}

.row-inactive {
  background: rgba(127, 29, 29, 0.34) !important;
}

.row-inactive:nth-child(even) {
  background: rgba(127, 29, 29, 0.40) !important;
}

.row-inactive:hover {
  background: rgba(153, 27, 27, 0.48) !important;
}

.row-inactive td,
.row-inactive .player-link,
.row-inactive .player-subname {
  color: #ffd1d1 !important;
}

/* Inventory cards */
.inventory-grid-wrap {
  padding: 0 24px 24px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.inventory-card {
  background: linear-gradient(180deg, rgba(16,28,56,0.98) 0%, rgba(12,22,45,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,0.20);
}

.inventory-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  background: radial-gradient(circle at center, rgba(59,130,246,0.10), rgba(255,255,255,0.02));
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 18px;
}

.inventory-icon {
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  image-rendering: auto;
}

.inventory-body {
  padding: 16px;
}

.inventory-item-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.inventory-item-code {
  color: #95a7c9;
  font-size: 0.92rem;
  margin-bottom: 14px;
  word-break: break-word;
}

.inventory-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #dfe7f8;
}

.inventory-meta-row span {
  color: #93a5c7;
}

.inventory-meta-row:last-of-type {
  margin-bottom: 12px;
}

.inventory-metadata-block {
  margin-top: 10px;
}

.empty-state {
  padding: 24px;
  color: #9eb0d2;
  text-align: center;
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.10);
}

@media (max-width: 1199.98px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-heading {
    font-size: 2.5rem;
  }
}

@media (max-width: 991.98px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .topbar {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .page-wrap {
    padding: 20px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 575.98px) {
  .login-card-pro {
    padding: 26px;
  }

  .login-heading {
    font-size: 2rem;
  }

  .topbar-title {
    font-size: 1.8rem;
  }

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

/* 🔴 NEAKTIVNÍ ŘÁDEK – CELÝ DO ČERVENA */
.panel-table-players tbody tr.row-inactive td {
  background: rgba(220, 38, 38, 0.25) !important;
  color: #fff !important;
}

/* hover */
.panel-table-players tbody tr.row-inactive:hover td {
  background: rgba(220, 38, 38, 0.35) !important;
}

/* zrušíme override na text */
.row-inactive td,
.row-inactive .player-link,
.row-inactive .player-subname {
  color: #fff !important;
}

.pagination .page-link {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #eaf1ff;
  border-radius: 12px;
  margin: 0 4px;
}

.pagination .page-link:hover {
  background: rgba(59,130,246,0.14);
  color: #fff;
  border-color: rgba(59,130,246,0.28);
}

.pagination .page-item.active .page-link {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.pagination .page-item.disabled .page-link {
  opacity: 0.5;
  pointer-events: none;
}