/* ==========================================================================
   KBS MEDIA PORTAL — upload page
   ========================================================================== */

.upload-main {
  padding-block: 32px 48px;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
}

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 42px 24px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.dropzone:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
}

.dropzone:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.dropzone.is-dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.11);
  transform: scale(1.005);
}

.dz-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 15px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

.dz-icon .icon {
  width: 24px;
  height: 24px;
}

[data-theme='light'] .dz-icon {
  color: var(--primary);
}

.dz-title {
  font-size: 15px;
  font-weight: 700;
}

.dz-hint {
  color: var(--muted);
  font-size: 13px;
}

.dz-hint u {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.dz-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 12px;
}

.queue {
  display: grid;
  gap: 8px;
}

.queue-empty {
  display: grid;
  gap: 4px;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.queue-empty strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  animation: queue-in 0.18s ease;
}

@keyframes queue-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
}

.queue-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--muted);
  overflow: hidden;
}

.queue-thumb .icon {
  width: 18px;
  height: 18px;
}

.queue-thumb img,
.queue-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-info {
  min-width: 0;
  flex: 1;
}

.queue-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.queue-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.queue-remove:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.cat-option {
  position: relative;
  display: block;
}

.cat-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.cat-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.cat-option .icon {
  width: 15px;
  height: 15px;
}

.cat-option input:checked + span {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.14);
  color: var(--text);
}

.cat-option input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.cat-option input:checked + span .icon {
  color: var(--primary);
}

.tips {
  display: grid;
  gap: 10px;
}

.tips li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.tips .icon {
  width: 15px;
  height: 15px;
  margin-top: 4px;
  color: var(--success);
  flex: 0 0 auto;
}

.progress-card {
  display: grid;
  gap: 10px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.progress-head strong {
  font-weight: 600;
}

.progress-percent {
  color: var(--primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 9px;
  border-radius: 99px;
  background: var(--bg-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.18s ease;
}

.progress-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.success-screen {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 28px;
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.success-check {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
  animation: pop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.success-check .icon {
  width: 32px;
  height: 32px;
  stroke-width: 2.4;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
}

.success-screen h2 {
  font-size: 18px;
  font-weight: 700;
}

.success-body {
  max-width: 44ch;
  color: var(--muted);
  font-size: 13px;
}

.success-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.success-meta span {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.upload-card {
  display: grid;
}
