* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Sukhumvit Set", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #222;
  padding: 20px;
}

.container {
  max-width: 720px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.container.wide {
  max-width: 1100px;
}

h1 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #333;
}

h2 {
  font-size: 18px;
  margin: 16px 0 12px;
  color: #444;
}

.subtitle {
  color: #777;
  font-size: 14px;
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
  margin-top: 14px;
  font-weight: 500;
}

input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d8dde6;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.15s;
  font-family: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: #667eea;
}

button {
  background: #667eea;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  font-family: inherit;
}

button:hover { background: #5568d3; }
button:active { transform: translateY(1px); }
button:disabled { background: #b8bdcf; cursor: not-allowed; }

button.primary { width: 100%; margin-top: 20px; }
button.secondary { background: #f0f2f8; color: #444; }
button.secondary:hover { background: #e2e6f0; }
button.danger { background: #e74c3c; }
button.danger:hover { background: #c0392b; }
button.success { background: #27ae60; }
button.success:hover { background: #229954; }

.message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
}
.message.error { background: #fee; color: #c33; border: 1px solid #fcc; }
.message.success { background: #efe; color: #383; border: 1px solid #cfc; }
.message.info { background: #eef; color: #338; border: 1px solid #ccf; }

.card {
  background: #fafbfd;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.peer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.peer-photo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #eef;
  border: 2px solid #d8dde6;
  position: relative;
}
.peer-photo img,
.peer-photo .no-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.peer-photo .no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aac;
  font-weight: 700;
  font-size: 22px;
}
.peer-photo.clickable { cursor: zoom-in; transition: transform 0.15s, border-color 0.15s; }
.peer-photo.clickable:hover { transform: scale(1.06); border-color: #667eea; }

.peer-info {
  flex: 1;
  min-width: 160px;
}

.peer-info .pname { font-weight: 500; color: #222; }
.peer-info .pid { color: #888; font-size: 13px; }

/* Photo zoom modal */
.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  cursor: zoom-out;
}
.photo-modal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}
.photo-modal-inner img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  background: #222;
  object-fit: contain;
}
.photo-modal-name {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  padding: 0 20px;
}
.photo-modal-close {
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  padding: 10px 28px;
  font-weight: 500;
}
.photo-modal-close:hover { background: #fff; }

.score-buttons {
  display: flex;
  gap: 6px;
}

.score-btn {
  width: 42px;
  height: 42px;
  border: 1.5px solid #d8dde6;
  background: #fff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: #555;
  padding: 0;
  transition: all 0.15s;
}

.score-btn:hover { border-color: #667eea; }
.score-btn.selected { background: #667eea; border-color: #667eea; color: #fff; }

.user-info {
  background: #f0f4ff;
  border: 1px solid #d6dffc;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.user-info b { color: #4555a6; }

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #f7f8fc;
  border-radius: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.status-bar .vote-state.open { color: #27ae60; font-weight: 600; }
.status-bar .vote-state.closed { color: #e74c3c; font-weight: 600; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

table th, table td {
  border-bottom: 1px solid #e6eaf2;
  padding: 10px 12px;
  text-align: left;
}

table th {
  background: #f7f8fc;
  font-weight: 600;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

table tbody tr:hover { background: #f9faff; }

.group-section { margin-bottom: 28px; }
.group-section .group-title {
  font-size: 16px;
  color: #444;
  font-weight: 600;
  background: #ebeef7;
  padding: 8px 14px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: inline-block;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e6eaf2;
  margin-bottom: 18px;
}
.tab {
  padding: 10px 18px;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 15px;
  color: #666;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
}
.tab.active { color: #667eea; border-bottom-color: #667eea; font-weight: 600; }

.hint {
  font-size: 13px;
  color: #888;
  margin-top: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h3 { margin-bottom: 14px; }
.modal-close { float: right; }

.score-pill {
  display: inline-block;
  background: #667eea;
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.empty-state {
  padding: 30px;
  text-align: center;
  color: #888;
  background: #fafbfd;
  border-radius: 10px;
}

/* Classroom listing (public landing) */
.classroom-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.classroom-card {
  display: block;
  background: #fff;
  border: 1.5px solid #e6eaf2;
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.classroom-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}
.cc-code {
  display: inline-block;
  background: #667eea;
  color: #fff;
  padding: 3px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.cc-name { font-size: 17px; font-weight: 600; color: #222; }
.cc-uni { font-size: 13px; color: #888; margin-top: 2px; }
.cc-desc { font-size: 13px; color: #666; margin-top: 8px; }
.cc-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: #777;
  flex-wrap: wrap;
}
.cc-meta .open { color: #27ae60; font-weight: 600; }
.cc-meta .closed { color: #aaa; }

/* Classroom row in admin list */
.classroom-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.cr-main { flex: 1; min-width: 240px; }
.cr-code {
  display: inline-block;
  background: #4555a6;
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.cr-name { font-size: 16px; font-weight: 600; color: #222; }
.cr-uni { font-size: 12px; color: #888; margin-top: 2px; }
.cr-desc { font-size: 13px; color: #666; margin-top: 6px; }
.cr-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; font-size: 12px; color: #777;
  align-items: center;
}
.cr-meta .open { color: #27ae60; font-weight: 600; }
.cr-meta .closed { color: #aaa; }
.tag-pr {
  background: #eef0ff;
  color: #4555a6;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.cr-actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start;
}

.status-grp {
  display: flex; gap: 16px; flex-wrap: wrap;
}

/* Mode option radio cards */
.mode-options {
  display: flex; flex-direction: column; gap: 8px; margin-top: 6px;
}
.mode-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #d8dde6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  margin: 0;
}
.mode-opt:hover { border-color: #667eea; }
.mode-opt:has(input:checked) {
  background: #eef0ff; border-color: #667eea;
}
.mode-opt input[type="radio"] { margin-top: 4px; flex-shrink: 0; }
.mode-opt > div { display: flex; flex-direction: column; gap: 2px; }
.mode-opt b { color: #222; font-size: 14px; }
.mode-opt span { color: #666; font-size: 12px; }

/* Group select dropdown in admin user table */
.group-select {
  padding: 4px 8px;
  border: 1.5px solid #d8dde6;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  min-width: 60px;
}
.group-select:focus { outline: none; border-color: #667eea; }

/* Top nav (homepage) */
.top-nav {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 50;
}
.login-btn {
  display: inline-block;
  background: #fff;
  color: #4555a6;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: all 0.15s;
}
.login-btn:hover {
  background: #4555a6;
  color: #fff;
}

/* Feed page */
.feed-body { background: linear-gradient(135deg, #f5f7ff 0%, #eef0ff 100%); }
.feed-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.my-profile-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
}
.my-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.my-photo img { width: 100%; height: 100%; object-fit: cover; }
.my-photo .no-photo.big {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #f0f0f0; color: #aac; font-size: 36px; font-weight: 700;
}
.my-info { flex: 1; min-width: 0; }
.my-greet { font-size: 18px; }
.my-greet b { font-size: 22px; }
.my-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }

.badge-group {
  background: rgba(255,255,255,0.25);
  padding: 4px 14px;
  border-radius: 12px;
  font-weight: 600;
}
.badge-group.no-group { background: rgba(255,200,0,0.4); }

.my-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.member-pill {
  background: #fff;
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  border: 1.5px solid #e6eaf2;
}
.member-pill.me {
  border-color: #667eea;
  background: #eef0ff;
}
.mp-photo {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #eef;
}
.mp-photo img { width: 100%; height: 100%; object-fit: cover; }
.mp-photo .no-photo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #aac; font-weight: 700;
}
.mp-name {
  font-size: 13px;
  margin-top: 6px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-pill.small {
  padding: 3px;
  background: transparent;
  border: none;
}
.member-pill.small .mp-photo { width: 38px; height: 38px; }

/* Activities */
.activities { margin: 24px 0; }
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.activity-card {
  display: block;
  background: #fff;
  border: 2px solid #e6eaf2;
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  text-align: center;
  position: relative;
}
.activity-card:hover {
  border-color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(102,126,234,0.2);
}
.act-icon { font-size: 38px; margin-bottom: 8px; }
.act-title { font-size: 18px; font-weight: 600; color: #222; }
.act-desc { font-size: 13px; color: #777; margin-top: 4px; }
.act-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: #e74c3c;
  color: #fff;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* Other groups */
.other-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.other-group-block {
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 10px;
}
.og-header {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.og-count {
  background: #667eea;
  color: #fff;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: 11px;
}
.og-members {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Assignment cards */
.assignment-card { padding: 14px 18px; }
.ac-head { margin-bottom: 6px; }
.ac-title { font-size: 16px; font-weight: 600; color: #222; }
.ac-meta { color: #777; font-size: 12px; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ac-desc { color: #555; font-size: 14px; margin: 8px 0; }
.ac-current {
  background: #f5f7fc;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 13px;
}
.ac-text { white-space: pre-wrap; color: #333; margin: 4px 0; }
.ac-form-details {
  margin-top: 8px;
  border-top: 1px solid #e6eaf2;
  padding-top: 10px;
}
.ac-form-details summary {
  cursor: pointer;
  color: #667eea;
  font-weight: 500;
  font-size: 14px;
}
.ac-form textarea {
  width: 100%;
  padding: 10px;
  border: 1.5px solid #d8dde6;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.ac-form input[type="file"] { font-family: inherit; padding: 6px 0; }
.ac-form button[type="submit"] { margin-top: 12px; }

.tag-individual,
.tag-group {
  display: inline-block;
  padding: 1px 8px;
  margin-left: 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.tag-individual { background: #e8f4ff; color: #2766b8; }
.tag-group { background: #fff0e8; color: #b86527; }

.badge-success {
  display: inline-block;
  background: #e8f6ec;
  color: #1e7e3a;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-pending {
  display: inline-block;
  background: #f0f1f5;
  color: #888;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.date-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid #d8dde6;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  margin: 0;
}
.date-check:hover { border-color: #667eea; }
.date-check input { width: 16px; height: 16px; cursor: pointer; }
.date-check:has(input:checked) {
  background: #eef0ff;
  border-color: #667eea;
  color: #4555a6;
  font-weight: 600;
}

.attend-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 1px 2px;
  border-radius: 10px;
  background: #eef0ff;
  color: #4555a6;
  font-size: 12px;
}
.attend-tag.absent { background: #f0f1f5; color: #aaa; text-decoration: line-through; }

/* Group selector buttons */
.group-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.group-btn {
  background: #fff;
  color: #555;
  border: 1.5px solid #d8dde6;
  padding: 14px 10px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.group-btn:hover { border-color: #667eea; color: #667eea; }
.group-btn.selected {
  background: #667eea;
  border-color: #667eea;
  color: #fff;
}

/* Selfie page */
.selfie-stage {
  margin: 18px 0;
  background: #1a1d2b;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.selfie-stage video,
.selfie-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.selfie-stage video { transform: scaleX(-1); }
.selfie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.selfie-actions button { flex: 1; min-width: 130px; }

/* Image thumbs */
.thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef;
  display: inline-block;
}
.thumb.no-photo {
  text-align: center;
  line-height: 44px;
  color: #aac;
  background: #eef;
  font-weight: 700;
}

/* Dashboard */
.dashboard-body {
  background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
  height: 100vh;
  overflow: hidden;
  padding: 0;
}

.dashboard-fullscreen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 14px 18px;
  gap: 12px;
}

.dash-header {
  background: #fff;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.dash-header h1 {
  font-size: 20px;
  margin: 0;
}
.dash-stats {
  font-size: 14px;
  color: #555;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.dash-links { display: flex; gap: 12px; margin-left: 8px; }
.dash-links a { color: #888; font-size: 13px; }

.groups-grid-2x2 {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

/* จอกว้างมาก เช่น ultrawide, โปรเจคเตอร์ → 4 คอลัมน์เรียงเดียว */
@media (min-aspect-ratio: 2/1) {
  .groups-grid-2x2 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
  }
}

/* แนวตั้ง (มือถือ portrait, แท็บเล็ต portrait) → 1 คอลัมน์ 4 แถว */
@media (max-aspect-ratio: 3/4) {
  .groups-grid-2x2 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
  }
}

/* หน้าจอเล็ก (มือถือ) → header เล็กลง, padding ลด */
@media (max-width: 600px) {
  .dashboard-fullscreen { padding: 6px 8px; gap: 6px; }
  .dash-header { padding: 8px 10px; gap: 4px; }
  .dash-header h1 { font-size: 15px; }
  .dash-stats { font-size: 12px; gap: 8px; width: 100%; }
  .dash-links { margin-left: 0; gap: 8px; }
  .group-card { padding: 8px 10px; }
  .group-header { margin-bottom: 6px; padding-bottom: 6px; }
  .group-header h2 { font-size: 14px; }
  .member-grid {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 6px;
  }
  .member-name { font-size: 11px; }
  .member-id { font-size: 10px; }
}

.group-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}
.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ebeef7;
  flex-shrink: 0;
}
.group-header h2 { margin: 0; color: #4555a6; font-size: 16px; }
.group-count {
  background: #667eea;
  color: #fff;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.member-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
}
.member-card {
  text-align: center;
  background: #fafbfd;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.2s;
}
.member-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.member-card img,
.member-card .no-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #eef;
  transition: border 0.2s;
}
.member-card .no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aac;
  font-weight: 700;
  font-size: 24px;
}
.member-card.no-selfie {
  opacity: 0.55;
}
.member-card.voted {
  background: #e8f6ec;
  box-shadow: 0 0 0 2px #27ae60;
}
.member-card.voted img {
  border: 2px solid #27ae60;
  box-sizing: border-box;
}
.vote-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #27ae60;
  color: #fff;
  border-radius: 50%;
  width: 28%;
  height: 28%;
  min-width: 22px;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.voted-pill {
  display: inline-block;
  background: #27ae60;
  color: #fff;
  padding: 1px 8px;
  margin-left: 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.member-name {
  font-size: 12px;
  color: #444;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-id {
  font-size: 11px;
  color: #888;
}
