:root {
  --bg: #0c0f14;
  --panel: #151a23;
  --panel-light: #1b2130;
  --panel-strong: #202738;
  --text: #e7eaf1;
  --muted: #8c95a6;
  --accent: #6bd46a;
  --accent-2: #2f7bd9;
  --danger: #e84c4c;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #0b0f14;
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #111520;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid #1a2130;
}

.brand {
  letter-spacing: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.user-card .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #2a3347;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-weight: 600;
}

.nav-section {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-section-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  cursor: pointer;
}

.nav-section-btn .caret {
  font-size: 12px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-section-btn.collapsed .caret {
  transform: rotate(-90deg);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
}

.nav-item.active {
  background: var(--panel-strong);
}

.nav-footer {
  margin-top: auto;
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item.sub-item {
  font-size: 13px;
  opacity: 0.9;
  padding-left: 18px;
}

.nav-item.server-btn {
  background: var(--panel-light);
}

.main {
  background: radial-gradient(circle at top, #1a1f2c 0%, #0b0f14 60%);
  display: flex;
  flex-direction: column;
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 28px 16px;
}

.auth-banner {
  text-align: center;
  max-width: 520px;
  margin-bottom: 4px;
}

.auth-card {
  width: min(420px, 100%);
}

@media (max-width: 600px) {
  .auth {
    gap: 6px;
  }

  .auth-banner h1 {
    font-size: 22px;
  }

  .auth-card {
    width: min(360px, 100%);
  }
}

a {
  color: var(--accent);
  text-decoration: none;
}

.topbar {
  padding: 16px 24px;
  background: #121722;
  border-bottom: 1px solid #1a2130;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search {
  width: min(420px, 100%);
}

.tabs {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tab-btn {
  background: var(--panel-light);
  color: var(--text);
  border: 1px solid #242c3d;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  background: #2e3a52;
  color: var(--text);
  border-color: transparent;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

main {
  padding: 24px 32px;
}

.content {
  flex: 1;
}

.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #b1385a;
  color: #f8f3f3;
  padding: 18px 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.promo .muted {
  color: #f1dbe2;
}

.card {
  background: var(--panel);
  border: 1px solid #1b212f;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0e120f;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn.secondary {
  background: #2b3548;
  color: var(--text);
}

.btn.danger {
  background: var(--danger);
  color: #1a0403;
}

.input,
select,
textarea {
  width: 100%;
  background: var(--panel-light);
  color: var(--text);
  border: 1px solid #242c3d;
  border-radius: 10px;
  padding: 8px 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #263044;
  color: var(--muted);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-list {
  max-height: calc(100vh - 260px);
  min-height: 360px;
  overflow: auto;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-strong);
  padding: 10px 12px;
  border-radius: 12px;
}

.log-row {
  border: 1px solid #2a3347;
  background: #2b3342;
}

.log-row .log-text {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
  color: #e9eef6;
  margin-bottom: 10px;
}

.log-row .log-coord {
  color: #2fd3a6;
  font-weight: 600;
}

.log-row .log-token {
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.log-row .log-time {
  color: #f2cf5b;
}

.log-row .log-steamid {
  color: #63b1ff;
}

.log-row .log-item {
  color: #7ed957;
}

.log-row .log-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.log-row .tag-chip {
  background: #1f2634;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--muted);
}

.log-row .log-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.log-row .btn.pid-search {
  background: #6bd46a;
  color: #0e120f;
}

.log-row .btn.pid-copy {
  background: #2f7bd9;
  color: #0b1018;
}

.log-row .btn.log-share {
  background: #e84c4c;
  color: #1a0403;
}

.row.active {
  border: 1px solid #2f3b55;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.open {
  display: flex;
}

.modal-content {
  width: min(900px, 92vw);
  max-height: 80vh;
  background: var(--panel);
  border-radius: 16px;
  padding: 18px;
  overflow: auto;
  box-shadow: var(--shadow);
  border: 1px solid #2a3347;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid #2a3347;
  text-align: left;
  font-size: 13px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bank-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bank-tabs .btn {
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1;
  border-radius: 10px;
  min-height: 28px;
}

.home-time {
  font-size: 28px;
  font-weight: 700;
  margin-top: 6px;
}

.home-greeting {
  display: flex;
  gap: 12px;
  align-items: center;
}

.home-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: #2a3347;
  border: 1px solid #2a3347;
}

.home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.warning-card {
  border: 1px solid #3a2a2a;
  background: linear-gradient(140deg, rgba(140, 30, 30, 0.2), rgba(25, 30, 45, 0.6));
}

.warning-text {
  color: #f3b5b5;
  font-weight: 600;
}

.split > div {
  min-width: 0;
}

.muted {
  color: var(--muted);
}

.file-tree {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #242c3d;
  border-radius: 12px;
  padding: 8px;
}

.file-tree button {
  background: none;
  border: none;
  color: var(--text);
  width: 100%;
  text-align: left;
  padding: 6px;
  cursor: pointer;
}

.file-tree button:hover {
  background: #232a3a;
}

.file-editor {
  min-height: 280px;
  font-family: "Consolas", "Courier New", monospace;
}

.banner {
  padding: 10px 14px;
  border-radius: 10px;
  background: #202738;
  color: var(--muted);
  border: 1px solid #2a3448;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .nav-footer {
    margin-left: auto;
  }
}

