:root {
  --black: #07050d;
  --panel: rgba(24, 20, 34, 0.68);
  --border: rgba(221, 207, 255, 0.16);
  --white: #f7f2ff;
  --muted: #b8aacd;
  --lavender: #d8c7ff;
  --violet: #8b5cf6;
  --magenta: #d946ef;
  --cyan: #67e8f9;
  --danger: #fb7185;
  --success: #86efac;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(139, 92, 246, 0.35), transparent 32%),
    radial-gradient(circle at 78% 8%, rgba(217, 70, 239, 0.22), transparent 30%),
    linear-gradient(135deg, #05030a 0%, #120b1f 47%, #090710 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.glass-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--white);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.3);
}

.secondary-button,
.ghost-button {
  border: 1px solid rgba(216, 199, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.danger-button {
  border: 1px solid rgba(251, 113, 133, 0.36);
  background: rgba(251, 113, 133, 0.12);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-2px);
}

.full-width {
  width: 100%;
}

.auth-body {
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 440px);
  gap: 28px;
  width: min(1080px, 100%);
}

.auth-brand {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 32px;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(7, 5, 13, 0.05), rgba(7, 5, 13, 0.8)),
    radial-gradient(circle at 48% 35%, rgba(216, 199, 255, 0.3), transparent 34%),
    linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(217, 70, 239, 0.1));
  box-shadow: var(--shadow);
}

.auth-brand h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 5.8rem);
  line-height: 0.93;
}

.brand-copy,
.sidebar-copy,
.drop-zone p,
.empty-state p {
  color: var(--muted);
  line-height: 1.7;
}

.brand-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.brand-metrics span {
  border: 1px solid rgba(216, 199, 255, 0.2);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--lavender);
  font-size: 0.85rem;
  font-weight: 700;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 28px;
  padding: 34px;
}

.auth-card h2,
.topbar h2,
.panel h3,
.drop-zone h3,
.sidebar h1 {
  margin: 0;
}

.auth-card form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.auth-card label {
  color: var(--lavender);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-card input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(216, 199, 255, 0.18);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.form-message {
  min-height: 22px;
  margin: 4px 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.form-message[data-type="success"] {
  color: var(--success);
}

.form-message[data-type="neutral"] {
  color: var(--muted);
}

.auth-card .ghost-button {
  margin-top: 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  min-height: 100vh;
  padding: 22px;
}

.sidebar {
  position: sticky;
  top: 22px;
  display: flex;
  height: calc(100vh - 44px);
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 24px;
}

.side-stats {
  display: grid;
  gap: 12px;
}

.side-stats div {
  border: 1px solid rgba(216, 199, 255, 0.13);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.side-stats span {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
}

.side-stats small {
  color: var(--muted);
}

.main-content {
  display: grid;
  gap: 22px;
}

.topbar,
.panel,
.upload-section {
  border-radius: var(--radius);
  padding: 22px;
}

.topbar,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px dashed rgba(216, 199, 255, 0.42);
  border-radius: 22px;
  padding: 30px;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.drop-zone.is-dragging {
  border-color: var(--cyan);
  background: rgba(103, 232, 249, 0.08);
  transform: scale(0.99);
}

.drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  font-size: 2rem;
  font-weight: 700;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.35fr);
  gap: 22px;
}

.track-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.track-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(216, 199, 255, 0.13);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.track-card-header,
.track-meta,
.track-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.track-name {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.track-meta,
.track-result {
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.progress-bar span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  transition: width 240ms ease;
}

.remove-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(251, 113, 133, 0.36);
  border-radius: 50%;
  background: rgba(251, 113, 133, 0.12);
  color: var(--white);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(216, 199, 255, 0.11);
  padding: 14px 12px;
  text-align: left;
}

th {
  color: var(--lavender);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: var(--white);
  font-size: 0.92rem;
}

.camelot-pill {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(139, 92, 246, 0.22);
  color: var(--cyan);
  font-weight: 800;
}

.empty-state {
  border: 1px solid rgba(216, 199, 255, 0.13);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
}

@media (max-width: 1080px) {
  .app-shell,
  .auth-shell,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 22px;
  }
}

@media (max-width: 680px) {
  .app-shell,
  .auth-body {
    padding: 14px;
  }

  .auth-brand,
  .auth-card,
  .topbar,
  .panel,
  .upload-section,
  .sidebar {
    border-radius: 18px;
    padding: 18px;
  }

  .auth-brand {
    min-height: 420px;
  }

  .topbar,
  .panel-header,
  .track-card-header,
  .track-meta,
  .track-result {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .topbar-actions button,
  .panel-header button {
    width: 100%;
  }
}
