:root {
  --bg: #05060a;
  --bg-elevated: #111320;
  --bg-elevated-soft: #181b2b;
  --accent: #5c7cfa;
  --accent-soft: rgba(92, 124, 250, 0.12);
  --accent-border: rgba(92, 124, 250, 0.4);
  --text: #f5f7ff;
  --muted: #a1a6c2;
  --danger: #ff6b6b;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 16px 45px rgba(0, 0, 0, 0.55);
  --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: radial-gradient(circle at top, #262b4a 0, #05060a 55%);
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.app-root {
  width: 100%;
  max-width: 1120px;
  margin: 24px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-header {
  text-align: left;
}

.app-header h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.03em;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.app-main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .app-main {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(145deg, #101223, #0a0c16);
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 18px 18px 16px;
}

.upload-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dropzone {
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle at top left, #22274b 0, #111320 45%, #070813 100%);
  padding: 18px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: radial-gradient(circle at top, #2c3a76 0, #121529 50%, #05060a 100%);
  transform: translateY(-1px);
}

.dropzone-inner {
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 16px 18px;
  text-align: center;
  background: radial-gradient(circle at top, rgba(92, 124, 250, 0.1), transparent 50%);
}

.dropzone-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.dropzone-subtitle {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.btn {
  border-radius: 999px;
  border: none;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease,
    color 0.12s ease, opacity 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(92, 124, 250, 0.4);
}

.btn.primary:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn.tiny {
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.5);
}

.btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.file-list {
  margin-top: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(5, 6, 10, 0.7);
  max-height: 180px;
  overflow: auto;
}

.file-list.empty {
  padding: 10px 12px;
  text-align: left;
}

.file-list-placeholder {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.file-item:last-child {
  border-bottom: none;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.file-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.badge {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.ok {
  background: rgba(46, 213, 115, 0.16);
  color: #7bf59e;
}

.badge.err {
  background: rgba(255, 107, 107, 0.14);
  color: var(--danger);
}

.badge.pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.size-pill {
  font-size: 11px;
  color: var(--muted);
}

.log-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.log-output {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #05060a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #d7dbff;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-footer {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.app-footer {
  margin-top: 4px;
  padding: 6px 2px 0;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  opacity: 0.9;
}

.app-footer-counter {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.app-footer-counter #totalCounter {
  font-weight: 600;
  color: var(--accent);
}
