.portal {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
}
.portal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 0.9rem;
}
.portal-card h2 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.7rem;
}
.portal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.subtitle { margin: 0 0 1rem; color: var(--muted); }
.portal-card label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}
.portal-card input[type="text"],
.portal-card input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  font: inherit;
  background: #fff;
}
.btn {
  border: 0;
  background: var(--lake);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}
.btn-outline {
  background: transparent;
  color: var(--lake);
  border: 1px solid var(--lake);
}
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn-danger { background: #b42318; }
.alert {
  padding: 0.6rem 0.8rem;
  border-radius: 0.55rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}
.alert.error { background: #fde8e8; color: #8a1f11; }
.alert.ok { background: #e4f6ea; color: #1d6b3a; }
.hidden { display: none !important; }
.dropzone {
  border: 1px dashed var(--line);
  border-radius: 0.85rem;
  padding: 1.4rem 1rem;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,0.45);
  cursor: pointer;
}
.dropzone.dragover { border-color: var(--lake); background: rgba(26,107,138,0.08); }
.upload-progress {
  height: 7px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin: 0.7rem 0;
}
.upload-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lake);
}
.media-list { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 1rem; }
.media-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255,255,255,0.5);
}
.media-item.off { opacity: 0.5; }
.media-item img, .media-item .ph {
  width: 96px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #d7e7ef;
  flex-shrink: 0;
}
.media-item .meta { flex: 1; min-width: 0; font-size: 0.85rem; }
.media-item .meta strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-item .actions { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.user-badge { margin-right: 0.6rem; color: var(--muted); font-size: 0.88rem; }
