* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: #0f1117;
  color: #e2e8f0;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: #1a1d2e;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  border-right: 1px solid #2d3148;
  position: fixed;
  height: 100vh;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.logo span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #6c7499;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

nav { display: flex; flex-direction: column; gap: 6px; }

.nav-btn {
  background: none;
  border: none;
  color: #8b92b8;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.nav-btn:hover { background: #252840; color: #fff; }
.nav-btn.active { background: #3b41d4; color: #fff; }

.refresh-info {
  margin-top: auto;
  font-size: 12px;
  color: #4a5080;
}

/* Main */
.main {
  margin-left: 220px;
  flex: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.stat-card {
  background: #1a1d2e;
  border: 1px solid #2d3148;
  border-radius: 12px;
  padding: 20px;
}
.stat-card .label {
  font-size: 12px;
  color: #6c7499;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-top: 6px;
}

/* Tab */
.tab { display: none; }
.tab.active { display: block; }

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  background: #1a1d2e;
  border: 1px solid #2d3148;
  border-radius: 8px;
  padding: 0 12px;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}
.search-box svg {
  width: 16px;
  height: 16px;
  color: #6c7499;
  flex-shrink: 0;
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 13px;
  padding: 10px 0;
  width: 100%;
}
.search-box input::placeholder { color: #4a5080; }

.filters select {
  background: #1a1d2e;
  border: 1px solid #2d3148;
  border-radius: 8px;
  color: #c8cee8;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.filters select:focus { border-color: #3b41d4; }

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.table-header h2 { font-size: 18px; font-weight: 600; }
.table-header button {
  background: #3b41d4;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.table-header button:hover { background: #2f35b0; }

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #2d3148;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr {
  background: #1a1d2e;
}
th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6c7499;
  border-bottom: 1px solid #2d3148;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid #1e2135;
  color: #c8cee8;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tbody tr:hover { background: #1e2135; }
tbody tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-blue  { background: #1e3a8a; color: #93c5fd; }
.badge-green { background: #14532d; color: #86efac; }
.badge-amber { background: #78350f; color: #fcd34d; }
.badge-red   { background: #7f1d1d; color: #fca5a5; }
.badge-gray  { background: #1e2135; color: #6c7499; }

.cart-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.cart-pill {
  background: #252840;
  border: 1px solid #3b41d4;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: #a5b4fc;
  white-space: nowrap;
}

.empty { text-align: center; color: #4a5080; padding: 40px; }

.del-btn {
  background: transparent;
  border: 1px solid #7f1d1d;
  color: #fca5a5;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.del-btn:hover { background: #7f1d1d; color: #fff; }
