.admin-shell {
  min-height: 100vh;
  padding: max(24px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.admin-panel {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.admin-head {
  align-items: flex-start;
}

.admin-login {
  max-width: 560px;
}

[hidden] {
  display: none !important;
}

.submissions-section {
  display: grid;
  gap: 16px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 4px;
}

.count-label {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

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

.small-button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: var(--gradient);
  color: #061013;
  font: inherit;
  font-weight: 900;
  padding: 0 14px;
  cursor: pointer;
}

.small-button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.small-button.danger {
  color: #fff1f2;
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.92), rgba(190, 18, 60, 0.92));
}

.team-action-status {
  flex-basis: 100%;
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.team-action-status[data-state="ok"] {
  color: var(--ok);
}

.team-action-status[data-state="error"] {
  color: var(--danger);
}

.submissions-list {
  display: grid;
  gap: 14px;
}

.submission-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 5, 14, 0.58);
  padding: 14px;
}

.photo-shell,
.submission-photo,
.photo-empty {
  width: 132px;
  height: 132px;
  border-radius: 10px;
}

.photo-shell {
  display: grid;
  overflow: hidden;
}

.submission-photo {
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.photo-empty {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(0, 212, 178, 0.35);
  background: rgba(0, 212, 178, 0.05);
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.submission-body {
  min-width: 0;
}

.submission-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.submission-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.grad-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(0, 212, 178, 0.55);
  border-radius: 999px;
  color: #d9fff8;
  background: linear-gradient(135deg, rgba(0, 212, 178, 0.22), rgba(99, 91, 255, 0.18));
  box-shadow: 0 0 0 1px rgba(0, 212, 178, 0.08), 0 12px 30px rgba(0, 212, 178, 0.1);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.edit-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
  cursor: pointer;
}

.delete-button {
  min-height: 32px;
  border: 1px solid rgba(251, 113, 133, 0.42);
  border-radius: 999px;
  background: rgba(251, 113, 133, 0.08);
  color: #fecdd3;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
  cursor: pointer;
}

.edit-button:hover {
  border-color: rgba(0, 212, 178, 0.5);
  color: var(--teal);
}

.delete-button:hover {
  border-color: rgba(251, 113, 133, 0.72);
  color: #ffe4e6;
}

.edit-button:disabled,
.delete-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

dt {
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.edit-form input {
  min-height: 46px;
  font-size: 15px;
  padding: 10px 12px;
}

.edit-actions,
.edit-status {
  grid-column: 1 / -1;
}

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

.edit-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.edit-status[data-state="error"] {
  color: var(--danger);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 20%, rgba(99, 91, 255, 0.2), transparent 34%),
    rgba(2, 5, 14, 0.76);
  backdrop-filter: blur(10px);
}

.confirm-dialog {
  width: min(100%, 460px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(13, 17, 31, 0.96), rgba(7, 10, 20, 0.96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  padding: 24px;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

.confirm-message {
  margin: 14px 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .submission-card {
    grid-template-columns: 1fr;
  }

  .submission-photo {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
  }

  .photo-shell,
  .photo-empty {
    width: 100%;
    height: 220px;
  }

  .submission-photo {
    height: auto;
    max-height: 360px;
  }

  dl,
  .edit-form {
    grid-template-columns: 1fr;
  }
}
