@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #0a0d12;
  --panel: #0e141d;
  --panel-2: #0b1118;
  --grid: #1c2634;
  --edge: #2a374a;
  --text: #e6edf6;
  --muted: #90a0b3;
  --accent: #4de3b8;
  --accent-2: #3aa0ff;
  --danger: #ff5d5d;
  --chip: #121a26;
  --chip-border: #2b394f;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background-color: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(18, 25, 35, 0.7) 0%, rgba(8, 11, 16, 0.9) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 28px
    );
}

input,
button {
  font-family: inherit;
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--edge);
  background: linear-gradient(180deg, #101723 0%, #0a0d12 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

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

.logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #041017;
  letter-spacing: 0.04em;
}

.topbar__title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.topbar__subtitle {
  font-size: 11px;
  color: var(--muted);
}

.topbar__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.statusbar {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--edge);
  background: rgba(10, 15, 22, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(77, 227, 184, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.shell__body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 0;
  flex: 1;
}

.simple__body {
  flex: 1;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: min(900px, 100%);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--edge);
  padding-bottom: 12px;
}

.card__header h2 {
  margin: 0;
  font-size: 18px;
}

.card__header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.card__content {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.file-block {
  display: grid;
  gap: 6px;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.file-meta--empty {
  color: rgba(144, 160, 179, 0.7);
  font-style: italic;
}

.file-name {
  color: var(--text);
  font-family: \"IBM Plex Mono\", monospace;
}

.file-size {
  font-family: \"IBM Plex Mono\", monospace;
}

.sidebar {
  border-right: 1px solid var(--edge);
  padding: 14px;
  background: var(--panel-2);
  display: grid;
  gap: 12px;
  align-content: start;
}

.sidebar__section {
  padding: 10px;
  border-radius: 6px;
  background: rgba(12, 18, 26, 0.9);
  border: 1px solid var(--edge);
  align-self: start;
}

.sidebar__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 10px;
}

.sidebar__hint {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

.stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--edge);
  font-size: 12px;
}

.stat:last-child {
  border-bottom: none;
}

.stat strong {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
}

.workspace {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.panel {
  padding: 12px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--edge);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.panel--dark {
  background: #0a0f16;
}

.panel__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.panel__header h2 {
  margin: 0 0 2px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.panel__header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.panel__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--chip-border);
  background: var(--chip);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tab--active {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(77, 227, 184, 0.4);
}

.chip {
  border: 1px solid var(--chip-border);
  background: var(--chip);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chip input,
.file-row input {
  display: none;
}

.chip--ghost {
  background: transparent;
  border-color: var(--edge);
  color: var(--muted);
}

.chip--danger {
  border-color: rgba(255, 93, 93, 0.5);
  color: #ffd1d1;
  background: rgba(255, 93, 93, 0.15);
}

.chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: 4px;
  background: #0b121b;
  border: 1px solid var(--edge);
  font-size: 11px;
  cursor: pointer;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.file-row--button {
  width: 100%;
  justify-content: flex-start;
  gap: 6px;
  color: var(--text);
}

.search {
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 5px 8px;
  min-width: 160px;
  background: #0b121b;
  font-size: 11px;
}

.table {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.table__head,
.table__row {
  display: grid;
  gap: 4px;
}

.table--servers .table__head,
.table--servers .table__row {
  grid-template-columns: 1.1fr 1fr 0.8fr 0.5fr 0.45fr 0.45fr 0.5fr;
}

.table--actions .table__head,
.table--actions .table__row {
  grid-template-columns: 1.1fr 0.9fr 1.1fr 0.9fr 1.2fr;
}

.table--keyboards .table__head,
.table--keyboards .table__row {
  grid-template-columns: 1.2fr 1fr 0.6fr;
}

.table--outputs .table__head,
.table--outputs .table__row {
  grid-template-columns: 0.5fr 0.6fr 1.6fr;
}

.table__cell {
  padding: 5px 6px;
  border-radius: 4px;
  background: #0b121b;
  color: inherit;
  border: 1px solid transparent;
  text-align: left;
}

.table__cell--head {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--edge);
}

.table__cell--text {
  background: transparent;
  border: 1px dashed var(--edge);
}

.table__cell--actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  background: transparent;
  border: none;
  padding: 0;
}

.input {
  border: 1px solid transparent;
  background: #0b121b;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77, 227, 184, 0.25);
}

.toggle {
  display: flex;
  align-items: center;
}

.toggle input {
  display: none;
}

.toggle span {
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: #182232;
  position: relative;
  border: 1px solid var(--edge);
}

.toggle span::after {
  content: "";
  width: 12px;
  height: 12px;
  position: absolute;
  top: 1px;
  left: 1px;
  border-radius: 50%;
  background: #d7e3f1;
  transition: transform 0.2s ease;
}

.toggle input:checked + span {
  background: rgba(77, 227, 184, 0.3);
}

.toggle input:checked + span::after {
  transform: translateX(14px);
  background: var(--accent);
}

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--edge);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 900px) {
  .table__head,
  .table__row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
