.forex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.forex-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: left;
  padding: 18px 16px;
  font-family: "Segoe UI", Arial, sans-serif;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
  min-height: 270px;
}

.forex-card:hover {
  transform: translateY(-3px);
}

/* HEADER */
.forex-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-left h3 {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

.flag {
  width: 25px;
  height: 17px;
  border-radius: 3px;
  object-fit: cover;
}

.header-right {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 0.3;
}

.header-right .posted-ago {
  font-size: 13px;
  color: #222;
  font-weight: 600;
}

.header-right .posted-date {
  font-size: 12px;
  color: #666;
}

.status {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-align: center;
}

/* BODY */
.forex-body p {
  margin: 5px 0;
  font-size: 14px;
  line-height: 1.5;
}

.forex-body strong {
  color: #000;
}

/* === STATUS COLORS === */
.forex-card.buy {
  background-color: #dff8e0;
  border-color: #9adf9a;
}
.forex-card.sell {
  background-color: #fde1e3;
  border-color: #e097a2;
}
.forex-card.filled {
  background-color: #f4f4f4;
  border-color: #ccc;
}
.forex-card.cancelled {
  background-color: #efefef;
  border-color: #ccc;
}

/* Text color for each */
.forex-card.buy .status { color: #1d7a1d; }
.forex-card.sell .status { color: #b52b3a; }
.forex-card.filled .status { color: #555; }
.forex-card.cancelled .status { color: #777; }

@media (max-width: 768px) {
  .forex-grid { grid-template-columns: 1fr; }
  .forex-header { flex-direction: column; align-items: center; text-align: center; }
  .header-right { text-align: center; margin-top: 5px; }
}
