/* =========================================================
   HISTORY PAGE
   ========================================================= */

.history-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.history-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.history-date {
  margin-bottom: 14px;
  padding-left: 6px;
  font-size: 13px;
  color: var(--muted);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item {
  display: flex;
}

.history-content {
  max-width: min(72%, 620px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  line-height: 1.5;
  font-size: 14px;
}

.history-text {
  display: block;
}

.history-meta {
  margin-top: 8px;
  font-size: 11px;
  text-align: right;
  color: var(--muted);
}

/* Подписка — обычная */
.history-subscribe {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
}

/* Заказ */
.history-order {
  border: none;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(124, 58, 237, 0.95));
  color: #fff;
}

/* Оплата */
.history-paid {
  border: none;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(34, 197, 94, 0.95));
  color: #fff;
}

/* Задание — спокойное серое */
.history-task {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.history-order .history-meta,
.history-paid .history-meta {
  color: rgba(255, 255, 255, 0.75);
}

.history-subscribe .history-meta,
.history-task .history-meta {
  color: var(--muted);
}

.history-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.history-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-task .history-icon svg {
  fill: currentColor;
  stroke-width: 1.6;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 640px) {
  .history-card {
    padding: 16px;
  }

  .history-content {
    max-width: 88%;
  }

  .history-row {
    gap: 8px;
  }

  .history-icon {
    width: 18px;
    height: 18px;
  }

  .history-icon svg {
    width: 16px;
    height: 16px;
  }
}