.panel,
.workbench-panel {
  background-color: rgba(34, 34, 34, 0.95);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.panel h5 {
  font-size: 1rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.workbench-panel {
  height: 750px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.deal-board-trade {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  flex-grow: 1;
  flex-direction: row;
}

@media (max-width: 991px) {
  .deal-board-trade {
    flex-direction: column;
  }
}

.trade-panel {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.3s ease;
}

.trade-panel:hover {
  border-color: rgba(0, 123, 255, 0.5);
}

.trade-panel.filled {
  border-style: solid;
}

.trade-panel .panel-content {
  flex-grow: 1;
}

.trade-icon {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.3);
}

.modal-content {
  background-color: rgba(25, 25, 28, 0.95);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  border-radius: 16px;
}

.modal-header,
.modal-footer {
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.workbench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.category-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.category-card:hover {
  background-color: rgba(0, 123, 255, 0.2);
  border-color: rgba(0, 123, 255, 0.5);
  transform: translateY(-4px);
}

.category-card .card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: rgba(0, 0, 0, 0.2);
}

.category-card .card-body {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.category-card .card-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #fff;
}

.category-card .card-description {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-card .card-footer {
  margin-top: auto;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.2);
}

.category-card .card-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: #00ff41;
}

.author-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.author-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .author-avatar {
    width: 48px;
    height: 48px;
  }
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.author-name {
  font-weight: bold;
  display: block;
}

.author-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.request-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 767px) {
  .request-body {
    gap: 1rem;
  }
}

.category-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .category-thumbnail {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

.request-details {
  flex-grow: 1;
}

.item-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.item-value {
  color: #00ff41;
  font-weight: 600;
}

.trade-panel-header {
  font-weight: bold;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offer-details-list {
  margin-bottom: 0;
}

.offer-details-list dt {
  color: rgba(255, 255, 255, 0.7);
  font-weight: normal;
}

.offer-details-list dd {
  color: white;
  font-weight: 600;
}

.verification-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .verification-actions {
    flex-direction: column;
  }

  .verification-actions .btn {
    width: 100%;
  }
}

.fulfillment-panel .progress-container {
  margin-bottom: 1.5rem;
}

.progress-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.progress-track {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #00ff41;
  transition: width 0.3s ease;
}

.obligation-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 767px) {
  .obligation-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .obligation-header .obligation-status,
  .obligation-header .obligation-action {
    display: none;
  }
}

.obligation-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.obligation-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  align-items: center;
  transition: all 0.2s ease;
}

.obligation-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 123, 255, 0.3);
}

@media (max-width: 767px) {
  .obligation-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.obligation-task {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.obligation-status {
  display: flex;
  justify-content: center;
}

@media (max-width: 767px) {
  .obligation-status {
    justify-content: flex-start;
  }
}

.obligation-action {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 767px) {
  .obligation-action {
    justify-content: flex-start;
  }

  .obligation-action .btn {
    flex: 1;
  }
}



/* ==========================================================================
   Modal Card Icon Redesign (Integrated Solution)
   ========================================================================== */

/* 
 * 1. The New Icon Container
 * This is the core of the fix. It creates a dedicated, padded, and high-contrast
 * panel for the icon, inheriting the card's overall aesthetic.
 */
.category-card .card-image-container {
    /* A slightly lighter background than the card for better contrast. */
    background-color: rgba(255, 255, 255, 0.08); 
    
    /* Use margin to create the inset panel effect. */
    margin: 12px; 
    
    /* Use a slightly smaller border-radius for a nested look. */
    border-radius: 8px; 
    
    /* Let the container be a square, respecting the grid's flow. */
    aspect-ratio: 1 / 1; 

    /* Use flexbox to perfectly center the icon within this container. */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 
 * 2. Override for the Icon Image
 * We target the image *inside* our new container to give it specific styles
 * that are better suited for icons than for photos.
 */
.category-card .card-image-container .card-image {
    /* CRITICAL FIX 1: Use 'contain' to ensure the entire icon is visible
       without being cropped, unlike 'cover'. */
    object-fit: contain;

    /* CRITICAL FIX 2: This filter inverts the black SVG to white and makes it pop. */
    filter: invert(1) brightness(1.5);

    /* Let the image be smaller than its container to create padding. */
    width: 60%;
    height: 60%;

    /* We no longer need a background color on the image itself. */
    background-color: transparent;
}

/* 
 * 3. Polish the Card Body
 * Adjust the padding to account for the new container structure.
 */
.category-card .card-body {
    /* Remove top padding since the container's margin now handles that spacing. */
    padding: 0 1rem 1rem;
    text-align: center; /* Ensure text is centered below the icon. */
}