/* AUTOGRADING — Mobile submission cards: select-all bar, identity overflow, touch targets */

.mobile-select-all-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.mobile-select-all-bar input[type="checkbox"],
.mobile-card-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #00c5df;
}

.mobile-select-all-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.mobile-submission-card .mobile-sub-card-top {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mobile-submission-card .mobile-sub-student-name {
  flex: 1 1 auto;
  min-width: 0;
}

.mobile-card-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.mobile-card-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-card-name,
.mobile-card-student-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main, #0f172a);
}

.mobile-card-student-id {
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mobile-card-status {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 2px 8px;
}

.mobile-card-score-wrap {
  text-align: right;
}

.mobile-card-score {
  font-size: 1.15rem;
}

.mobile-card-score-max,
.mobile-card-score-empty {
  font-size: 0.75rem;
  color: #64748b;
}

.mobile-card-score-empty {
  font-weight: 700;
  color: #94a3b8;
}

.mobile-sub-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.mobile-sub-card-actions .btn {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-card-primary {
  flex: 1 1 140px;
  font-weight: 700;
}

.mobile-card-primary[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.mobile-card-icon-btn {
  min-width: 44px;
  max-width: 44px;
  padding: 0;
}

.mobile-card-danger,
.mobile-card-reject {
  color: #ef4444;
  border-color: #fca5a5;
}

.mobile-cards-empty {
  text-align: center;
  color: var(--text-muted, #64748b);
  padding: 2rem 1rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

@media (max-width: 360px) {
  .mobile-card-primary {
    flex-basis: 100%;
  }
}

/* ==========================================================================
   MOBILE SUBMISSION CARDS & BARS DARK MODE
   ========================================================================== */
[data-theme="dark"] .mobile-select-all-bar,
html[data-theme="dark"] .mobile-select-all-bar,
body.dark-mode .mobile-select-all-bar {
  background: rgba(9, 35, 78, 0.94) !important;
  border-color: rgba(0, 197, 223, 0.22) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .mobile-select-all-count {
  color: #94a3b8 !important;
}

[data-theme="dark"] .mobile-submission-card {
  background: #09234e !important;
  border-color: rgba(0, 197, 223, 0.18) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .mobile-submission-card:active {
  border-color: #38bdf8 !important;
  background: #0d2c60 !important;
}

[data-theme="dark"] .mobile-sub-student-name,
[data-theme="dark"] .mobile-card-name {
  color: #f8fafc !important;
}

[data-theme="dark"] .mobile-card-student-id {
  color: #94a3b8 !important;
}

[data-theme="dark"] .mobile-sub-card-middle {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .mobile-card-avatar {
  background: rgba(0, 197, 223, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(0, 197, 223, 0.3) !important;
}

[data-theme="dark"] .mobile-card-score {
  color: #38bdf8 !important;
}

[data-theme="dark"] .mobile-card-score-max {
  color: #94a3b8 !important;
}

[data-theme="dark"] .mobile-card-score-empty {
  color: #64748b !important;
}

[data-theme="dark"] .mobile-card-icon-btn {
  background: #071d42 !important;
  border-color: rgba(0, 197, 223, 0.22) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .mobile-card-icon-btn:hover {
  background: #103572 !important;
  border-color: rgba(0, 197, 223, 0.45) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .mobile-cards-empty,
html[data-theme="dark"] .mobile-cards-empty,
body.dark-mode .mobile-cards-empty {
  background: #09234e !important;
  border-color: rgba(0, 197, 223, 0.2) !important;
  color: #94a3b8 !important;
}

