:root {
  --bg: #020610;
  --panel: #0d1323;
  --panel-accent: #141c34;
  --text: #e7ecff;
  --muted: #8aa1d3;
  --highlight: #03dffc;
  --border: rgba(255, 255, 255, 0.08);
  --button: #14b6ff;
  --button-soft: #1d2447;
  --danger: #ff5a5f;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% -10%, rgba(3, 223, 252, 0.12), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(121, 106, 255, 0.25), transparent 35%),
    var(--bg);
  color: var(--text);
}

.portal-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(2, 6, 16, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.hero-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 3vw, 3.3rem);
  margin: 0 0 0.5rem;
}

.hero p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-media img {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.auth-card,
.workspace {
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 15px 40px rgba(7, 11, 26, 0.65);
}

.auth-card {
  flex: 1 1 320px;
  padding: 2rem;
}

.workspace {
  flex: 2 1 700px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 660px;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.9rem;
}

input,
button,
textarea,
select {
  width: 100%;
  font-family: inherit;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

input:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(3, 223, 252, 0.25);
}

button {
  border: none;
  border-radius: 12px;
  background: var(--button);
  color: #0c1122;
  font-weight: 600;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(3, 223, 252, 0.25);
}

button.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
  padding: 0.65rem 1.1rem;
}

.workspace-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.workspace-top h2 {
  margin: 0;
  font-size: 2.1rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--highlight);
}

.workspace-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.menu-item {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #dfe3ff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, border 0.2s ease;
}

.menu-item.active {
  background: linear-gradient(135deg, rgba(3, 223, 252, 0.18), rgba(3, 223, 252, 0.05));
  border-color: rgba(3, 223, 252, 0.6);
  transform: translateY(-1px);
}

.workspace-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.workspace-panel {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  display: none;
  min-height: 260px;
}

.workspace-panel.active {
  display: block;
}

.wide-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.wide-form button {
  align-self: flex-start;
}

.panel.job-panel {
  width: 100%;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(3, 223, 252, 0.06), rgba(5, 7, 15, 0.95));
  padding: 1.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-head h3 {
  margin: 0;
  font-size: 1.4rem;
}

.panel-head .mini-text {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.panel-head .stats {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.tag.status-tag {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(3, 223, 252, 0.16);
  color: var(--highlight);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-progress-track {
  margin: 1rem 0 0.4rem;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.job-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #03dffc, #7044ff);
  transition: width 0.3s ease;
}

.job-panel ul {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
}

.job-panel li {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-wrap: anywhere;
}

.job-panel li.active {
  border-color: rgba(3, 223, 252, 0.5);
  background: rgba(3, 223, 252, 0.08);
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.job-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
  gap: 1rem;
}

.mini-text {
  margin: 0;
  color: var(--muted);
}

.status-badge {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.type-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  display: inline-flex;
  gap: 0.3rem;
}

.remote-link {
  font-size: 0.85rem;
  color: #7cc4ff;
  text-decoration: none;
}

.download-btn {
  align-self: flex-start;
  border-radius: 12px;
  padding: 0.45rem 0.85rem;
  border: none;
  background: var(--button);
  color: #0c1122;
}

.artifact-list {
  margin: 1.2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}

.artifact-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.artifact-item span {
  font-size: 0.85rem;
}

.artifact-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8cf1ff;
}

.log-info {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 1.25rem;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.01);
}

.log-info ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.log-info li {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.progress-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(3, 223, 252, 0.6), rgba(112, 68, 255, 0.8));
  transition: width 0.15s ease;
}

.hidden {
  display: none !important;
}

.notification {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--muted);
}

.notification.error {
  border-color: rgba(255, 90, 95, 0.6);
  background: rgba(255, 90, 95, 0.08);
  color: #ff898f;
}

@media (max-width: 900px) {
  .workspace {
    min-height: unset;
    padding: 1.5rem;
  }
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
