:root {
  --bg: #0b0f1a;
  --panel: #131a2b;
  --panel-border: #232c44;
  --text: #eef1f8;
  --muted: #9aa4bd;
  --accent: #6c8cff;
  --accent-2: #35d0ba;
  --danger: #ff6b6b;
  font-family: 'Segoe UI', Tahoma, 'Noto Kufi Arabic', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent); top: -150px; right: -100px; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-2); bottom: -100px; left: -100px; }

.topbar {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
  border-bottom: 1px solid var(--panel-border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { font-size: 22px; font-weight: 800; color: var(--accent); }
.brand-sub { color: var(--muted); font-size: 14px; }

.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

.hero { text-align: center; margin-bottom: 32px; }
.hero h1 { font-size: 26px; line-height: 1.5; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 15px; margin: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
}

.dropzone {
  border: 2px dashed var(--panel-border);
  border-radius: 14px;
  padding: 36px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(108, 140, 255, 0.06);
}
.dropzone-icon { font-size: 28px; color: var(--accent); margin-bottom: 8px; }
.dropzone-title { margin: 0 0 4px; font-weight: 600; }
.dropzone-hint { margin: 0; color: var(--muted); font-size: 13px; }
.file-name { margin: 12px 0 0; color: var(--accent-2); font-weight: 600; }

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  gap: 12px;
}
.field-row label { color: var(--muted); font-size: 14px; }
.field-row select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06101f; width: 100%; }
.btn.secondary { background: var(--accent); color: #06101f; }
.btn.ghost { background: transparent; border: 1px solid var(--panel-border); color: var(--text); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.error-text { color: var(--danger); font-size: 14px; margin-top: 12px; min-height: 0; }
.error-text.hidden { display: none; }

.jobs { margin-top: 40px; }
.jobs-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.jobs-header h2 { font-size: 18px; margin: 0; }

.jobs-list { display: flex; flex-direction: column; gap: 10px; }
.job-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.15s;
}
.job-item:hover { border-color: var(--accent); }
.job-item-name { font-weight: 600; }
.job-item-date { color: var(--muted); font-size: 12px; margin-top: 2px; }
.empty-state { color: var(--muted); text-align: center; padding: 24px; }

.status-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-uploaded, .status-processing { background: rgba(108, 140, 255, 0.15); color: var(--accent); }
.status-completed { background: rgba(53, 208, 186, 0.15); color: var(--accent-2); }
.status-error { background: rgba(255, 107, 107, 0.15); color: var(--danger); }

.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 8, 16, 0.7); }
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.modal-panel h2 { margin: 0 12px 12px 0; font-size: 18px; }
.modal-panel h3 { font-size: 15px; color: var(--muted); margin: 20px 0 8px; }

.transcript-box {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 16px;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 14px;
  max-height: 320px;
  overflow-y: auto;
}
.summary-box { border-color: var(--accent-2); }

.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hidden { display: none !important; }
