:root {
  --primary: #3a86ff;
  --primary-hover: #265bb5;
  --border: #f0f0f0;
  --bg-card: #fff;
  --bg-popup: rgba(0,0,0,0.32);
  --gray: #888;
}

.relod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.relod-student-card {
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 2px 10px #e5ebf7;
  padding: 28px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow .2s;
}

.relod-student-card:hover { box-shadow: 0 6px 16px #c2d7fc; }

.relod-avatar { margin-bottom: 12px; }

.relod-fullname {
  font-size: 18px;
  font-weight: 600;
  color: #2d3557;
  margin-bottom: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s;
}
.relod-fullname:hover { color: var(--primary); }

.relod-add-friend {
  color: var(--gray);
  font-size: 13px;
  border-bottom: 1px solid var(--gray);
  text-decoration: none;
  margin-top: 2px;
  padding: 2px 0;
  transition: color .2s;
  cursor: pointer;
}
.relod-add-friend:hover { color: var(--primary-hover); border-bottom-color: var(--primary-hover); }

.relod-btn {
  background: var(--primary);
  color: #fff;
  padding: 7px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  margin: 2px 0;
  transition: background .2s;
}
.relod-btn:hover { background: var(--primary-hover); }

.relod-popup {
  position: fixed; left:0; top:0; width:100vw; height:100vh;
  background: var(--bg-popup); display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.relod-popup-content {
  background: #fff;
  border-radius: 14px;
  padding: 30px 30px 18px 30px;
  min-width: 300px; max-width: 90vw;
  box-shadow: 0 4px 32px #5e729940;
  position: relative;
}
.relod-msg-textarea, .relod-dialog-input {
  width: 100%;
  min-height: 70px;
  font-size: 15px;
  margin: 14px 0 0 0;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  outline: none;
  resize: vertical;
}
.relod-popup-actions { margin-top: 10px; display: flex; gap: 12px; }

.relod-messages-list, .relod-notifications-list {
  display: flex; flex-direction: column; gap: 18px; margin-top:18px;
}
.relod-dialog-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: 10px; background: #fafcff; box-shadow: 0 1px 8px #e8e8ea44; cursor: pointer;
  transition: box-shadow .2s, background .2s;
}
.relod-dialog-card:hover { background: #e7f0fe; box-shadow: 0 2px 16px #dae1fa; }
.relod-msg-date { font-size: 13px; color: var(--gray); }
.relod-dialog-messages { margin: 16px 0; }
.relod-dialog-message-row { margin-bottom: 7px; }
.relod-dialog-message-row.you { text-align: right; }
.relod-dialog-message-row .author { font-weight: bold; color: var(--primary); }
.relod-notification {
  background: #f5f6fa;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 8px #e8e8ea44;
  margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
@media (max-width: 900px) {
  .relod-grid { grid-template-columns: repeat(2, 1fr);}
}
@media (max-width: 600px) {
  .relod-grid { grid-template-columns: 1fr; }
  .relod-popup-content { min-width:90vw; padding:14px 5vw 10px 5vw; }
  .relod-student-card { padding:16px 6px; }
}
