/* ===== Личный кабинет ===== */

.lk-container {
  background: var(--color-gray-light-light);
  max-width: 1200px;
  padding: 0 20px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ===== Header ===== */

.lk-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-gray-medium);
}

.lk-user {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
}

/* ===== Main ===== */

.lk-main {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.common {
  display: flex;
  flex-direction: row;
  gap: 25px;
}

.pay {
  flex: 1
}

.refs {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 25px;
}

/* ===== Info text ===== */

.info-text {
  margin: 0 auto;
  padding: 20px;
  border-radius: 14px;
  background: #f4f7fb;
  border: 1px solid #dbe3ef;
}

.info-text p {
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: left;
  font-size: 1rem;
}

/* Быстрый переход */

.quick-actions {
  max-width: 900px;
  margin: 20px auto 10px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-btn {
  flex: 1 1 1;
  max-width: 280px;
  padding: 14px 20px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  color: white;
  background: var(--color-primary);
  box-sizing: border-box;
  transition: 0.3s ease;
}

.quick-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* ===== Status ===== */

.status-box {
  max-width: 420px;
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: 14px;
  text-align: center;
  font-weight: 700;
}

.status-box.active {
  background: #eefbea;
  color: #0a8800;
}

.status-box.inactive {
  background: #fff6e5;
  color: var(--color-accent);
}

.ref {
  margin: 0 auto;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Tariffs ===== */

.tariffs {
  padding: 20px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ВАЖНО: flex должен работать по form */
.payment-form {
  flex: 1 1 1;
  max-width: 280px;
}

/* ===== Card ===== */

.tariff-card {
  height: 100%;
  padding: 25px;
  border: 2px solid #ddd;
  border-radius: 16px;
  text-align: center;
  background: #fff;
  transition: 0.3s ease;
  box-sizing: border-box;
}

.tariff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.tariff-card.popular {
  border-color: #007bff;
  background: #f8fbff;
  transform: scale(1.03);
}

.tariff-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
}

.tariff-card p {
  margin: 10px 0;
  color: #555;
}


/* ===== Button ===== */

.tariff-btn {
  width: 100%;
  max-width: 100px;
  margin-top: 15px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  color: white;
  background: #28a745;
  transition: 0.3s ease;
}

.tariff-btn:hover {
  transform: translateY(-2px);
}

.tariff-card.popular .tariff-btn {
  background: #007bff;
}

/* ===== Table ===== */

.payment-history {
  margin: 10px;
  padding: 20px;
  border-radius: 14px;
  background: #f4f7fb;
  border: 1px solid #dbe3ef;


}

.lk-table {
  width: 100%;
  overflow: hidden;
  font-size: 14px;
  border-collapse: collapse;
}

.lk-table th,
.lk-table td {
  padding: 8px 4px;
  border: 1px dashed var(--color-primary);
}

.referral-box,
.ref-stats,
.ref-history,
.ref-withdraw {
  margin: 0 auto;
  width: 100%;
  padding: 20px;
  border-radius: 12px;
  background: #f4f7fb;
  border: 1px solid #dbe3ef;
}

.ref-stats {
  font-size: 1.25rem;
}

.ref-alert {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-weight: 600;
}

.ref-success {
  background: #dff6e4;
  color: #18794e;
}

.ref-error {
  background: #ffe3e3;
  color: #b42318;
}

.ref-link-wrap {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.ref-link-wrap input {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.ref-link-wrap button {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
}


.ref-table {
  width: 100%;
  overflow: hidden;
  font-size: 14px;
  border-collapse: collapse;
}

.ref-table th,
.ref-table td {
  padding: 8px 4px;
  border: 1px dashed var(--color-primary);
}

.ref-withdraw input {
  width: 100%;
  padding: 5px;
  margin: 10px;


}

.withdraw-agree {
  display: flex;
  align-items: flex-end;
  white-space: nowrap;
  font-size: 12px;
  padding-bottom: 10px;
}

.withdraw-agree input {
  margin: 0;
  width: 3rem;
  cursor: pointer;
}

.withdraw-agree a {
  color: var(--color-primary);
  text-decoration: underline;
}


.ref-withdraw button {
  display: block;
  margin: 0 auto;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  transition: 0.2s;
}

.ref-withdraw button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


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

/* ===== Mobile ===== */

@media (max-width: 768px) {
  .lk-container {
    padding: 20px 12px;
    margin: 15px;
  }

  .lk-user {
    font-size: 18px;
  }

  .info-text {
    padding: 15px;
  }

  .info-text p {
    font-size: 14px;
    text-align: left;
  }

  .tariffs {
    flex-direction: column;
    align-items: center;
  }

  .payment-form {
    width: 100%;
    max-width: 100%;
  }

  .tariff-card {
    width: 100%;
  }

  .lk-table {
    font-size: 12px;
    border-collapse: collapse;
  }

  .lk-table th,
  .lk-table td {
    padding: 8px 4px;
    border: 1px dashed var(--color-primary);
  }

  .quick-actions {
    flex-direction: column;
    align-items: center;
  }

  .quick-btn {
    width: 100%;
    max-width: 100%;
  }

  .common {
    flex-direction: column;
  }
}