@font-face {
  font-family: 'Poppins';
  src: url('font/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('font/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f4ef;
  --shell: #fbfbf7;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(255, 255, 255, 0.18);
  --ink: #08120d;
  --muted: #d7efe1;
  --muted-dark: #4f6659;
  --brand: #09d66f;
  --brand-2: #0d8d79;
  --brand-3: #0a5f4f;
  --accent: #ff5f67;
  --accent-hover: #c0363d;
  --accent-soft: #fff2e8;
  --card-shadow: 0 24px 70px rgba(5, 30, 18, 0.22);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(13, 214, 111, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(10, 95, 79, 0.2), transparent 28%),
    linear-gradient(180deg, #f0f7f2 0%, #f4f4ef 40%, #eef5f0 100%);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body.upload-mode .shell {
  width: min(980px, 94vw);
}

body.to-step2 .upload-panel {
  animation: toStepTwo 560ms cubic-bezier(.2, .8, .2, 1) forwards;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(4, 52, 30, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(4, 52, 30, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
  z-index: -3;
}

.bg-glow {
  position: fixed;
  inset: -20vh -15vw;
  background:
    radial-gradient(circle at 14% 18%, rgba(9, 214, 111, 0.26), transparent 30%),
    radial-gradient(circle at 85% 8%, rgba(9, 214, 111, 0.22), transparent 24%),
    radial-gradient(circle at 50% 40%, rgba(255, 91, 104, 0.08), transparent 20%),
    radial-gradient(circle at 68% 100%, rgba(10, 95, 79, 0.16), transparent 28%);
  filter: blur(18px);
  animation: glowShift 9s ease-in-out infinite alternate;
  z-index: -2;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 18px 22px;
  min-height: 88px;
  background: #00d473;
  box-shadow: 0 10px 30px rgba(2, 42, 23, 0.16);
}

.topbar-inner {
  width: min(1240px, 94vw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.listen-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.listen-pill.is-disabled {
  pointer-events: none;
  opacity: 0.8;
}

.shell {
  width: min(1240px, 94vw);
  margin: 24px auto 48px;
  display: grid;
  gap: 18px;
}

.upload-panel,
.work-panel,
.status-banner {
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.flow-step {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 76px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(9, 61, 37, 0.08);
  box-shadow: 0 18px 40px rgba(5, 30, 18, 0.08);
  color: var(--muted-dark);
  text-align: center;
}

.flow-step-number {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 600 16px/1 'Poppins', sans-serif;
  background: rgba(8, 207, 104, 0.12);
  color: #0b5e43;
  flex: 0 0 auto;
}

.flow-step.is-active {
  background: linear-gradient(135deg, #08cf68, #0d8d79);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.flow-step.is-active .flow-step-number {
  background: #fff;
  color: #0b5e43;
}

.status-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
}

.status-banner {
  display: grid;
  grid-template-columns: 1fr;
  padding: 18px 22px;
  background: #ff5f67;
  color: #fff;
  border: none;
}

.status-banner-info {
  box-shadow: 0 18px 40px rgba(255, 95, 103, 0.28);
}

.status-banner-success {
  background: #ff5f67;
}

.status-banner-progress {
  background: #ff5f67;
}

.status-banner-error {
  background: #ff5f67;
}

.status-banner-copy {
  display: grid;
  gap: 4px;
}

.status-headline,
#statusHeadline {
  font-size: clamp(22px, 3vw, 30px);
}

.status-text {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.upload-panel,
.work-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 249, 0.9));
  border: 1px solid rgba(9, 61, 37, 0.08);
  padding: 22px;
  animation: panelIn 700ms ease-out both;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  margin: 6px 0 0;
  font: 400 clamp(28px, 4vw, 42px)/1 'Poppins', sans-serif;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: clamp(260px, 36vh, 420px);
  padding: 24px;
  border-radius: 24px;
  border: 2px dashed rgba(7, 154, 88, 0.3);
  background:
    radial-gradient(circle at top, rgba(9, 214, 111, 0.1), transparent 30%),
    linear-gradient(180deg, #fdfefc, #f2faf5);
  cursor: pointer;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
  isolation: isolate;
}

.dropzone::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78vw, 32rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 95, 103, 0.24) 0 26%, rgba(255, 95, 103, 0.18) 27% 48%, rgba(255, 95, 103, 0.08) 49% 64%, transparent 65% 100%);
  transform: translate(-50%, -50%) scale(1.18);
  animation: dropPulse 4.2s ease-in-out infinite;
  opacity: 0.9;
  transition: opacity 200ms ease;
  z-index: 0;
  pointer-events: none;
}

.dropzone::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(60vw, 24rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 95, 103, 0.08), transparent 58%);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(255, 95, 103, 0.22), 0 18px 40px rgba(120, 31, 38, 0.16);
}

.dropzone:hover::before,
.dropzone.drag-over::before {
  opacity: 1;
}

.dropzone input {
  display: none;
}

.drop-title,
.drop-sub {
  position: relative;
  z-index: 1;
}

.drop-title {
  font: 400 clamp(30px, 4vw, 48px)/1 'Poppins', sans-serif;
  letter-spacing: normal;
  text-align: center;
}

.drop-sub {
  font-size: 13px;
  color: var(--muted-dark);
  letter-spacing: normal;
  text-align: center;
}

.workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.workflow-grid > * {
  min-width: 0;
}

.workflow-grid.program-only {
  grid-template-columns: minmax(0, 1fr);
  width: min(980px, 100%);
}

#programStep,
#controlStep {
  grid-column: 1;
}

#downloadStep {
  grid-column: 1;
}

.program-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.program-select {
  flex: 1 1 260px;
  min-width: 220px;
  border: 1px solid rgba(12, 84, 53, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 14px 18px;
  font: 600 15px/1.2 'Poppins', sans-serif;
}

.controls,
.actions {
  display: grid;
  gap: 12px;
}

.action-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 249, 0.9));
  color: var(--ink);
}

.action-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.btn {
  border: 1px solid rgba(11, 82, 52, 0.16);
  background: #f8fcf9;
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 18px;
  font: 600 13px/1 'Poppins', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #07b35f;
  box-shadow: 0 10px 24px rgba(9, 62, 37, 0.16);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.check-summary {
  margin-top: 10px;
  color: var(--muted-dark);
  font-size: 14px;
  line-height: 1.5;
}

.check-summary-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.check-summary-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hours-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
}

.hours {
  display: grid;
  gap: 14px;
}

.hour-card {
  border: 1px solid rgba(11, 87, 54, 0.1);
  background:
    radial-gradient(circle at top right, rgba(9, 214, 111, 0.08), transparent 24%),
    #fcfefc;
  border-radius: 22px;
  padding: 16px;
  animation: rowIn 420ms ease both;
}

.hour-title {
  margin-bottom: 10px;
  font: 400 28px/1 'Poppins', sans-serif;
  letter-spacing: 0.06em;
}

.track-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid rgba(11, 87, 54, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.track-table .col-position {
  width: 96px;
}

.track-table .col-artist {
  width: 30%;
}

.track-table .col-title {
  width: auto;
}

.track-table .col-length {
  width: 92px;
}

.track-table .col-year {
  width: 76px;
}

.track-table th,
.track-table td {
  border-bottom: 1px solid rgba(11, 87, 54, 0.08);
  border-right: 1px solid rgba(11, 87, 54, 0.08);
  padding: 8px 6px;
  font-size: 13px;
  text-align: left;
  min-width: 0;
}

.track-table th {
  color: var(--muted-dark);
  background: rgba(9, 61, 37, 0.04);
}

.track-table th:last-child,
.track-table td:last-child {
  border-right: none;
}

.track-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(13, 187, 103, 0.36);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 10px 10px;
  font: 600 13px 'Poppins', sans-serif;
}

.track-table input:focus {
  outline: none;
  border-color: #0dbb67;
  box-shadow: 0 0 0 3px rgba(13, 187, 103, 0.14);
}

.cell-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.needs-review td input {
  border-color: rgba(13, 187, 103, 0.36);
  background: transparent;
  color: var(--ink);
}

.needs-review td input:focus {
  border-color: #0dbb67;
}

.check-summary-warning {
  color: #a21d2a;
  font-weight: 600;
}

.proposal-apply {
  flex: 0 0 auto;
  border: 1px solid rgba(162, 29, 42, 0.28);
  border-radius: 8px;
  background: #fff;
  color: #a21d2a;
  padding: 5px 8px;
  font: 600 11px 'Poppins', sans-serif;
  cursor: pointer;
}

.proposal-apply:hover {
  background: #fff2e8;
}

.empty {
  color: var(--muted-dark);
  padding: 12px 4px 4px;
}

.action-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.action-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 16, 11, 0.48);
  backdrop-filter: blur(8px);
}

.action-modal-card {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  overflow: auto;
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(9, 214, 111, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 246, 0.97));
  border: 1px solid rgba(11, 82, 52, 0.1);
  box-shadow: 0 30px 80px rgba(6, 20, 13, 0.28);
  animation: modalIn 220ms ease-out both;
}

.action-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.action-modal-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-dark);
}

.action-modal-title {
  margin: 8px 0 0;
  font: 400 clamp(28px, 4vw, 38px)/1 'Poppins', sans-serif;
  letter-spacing: 0.03em;
}

.action-modal-close {
  border: 1px solid rgba(11, 82, 52, 0.14);
  background: #f8fcf9;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font: 600 12px/1 'Poppins', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.action-modal-close.is-disabled,
.action-modal-close:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.action-modal-status {
  margin: 16px 0 0;
  color: #173327;
  font-size: 16px;
  line-height: 1.55;
}

.action-modal-loader {
  width: 56px;
  height: 56px;
  margin: 18px 0 0;
  border-radius: 999px;
  border: 4px solid rgba(9, 214, 111, 0.16);
  border-top-color: #09d66f;
  animation: spinSweep 0.9s linear infinite;
}

.action-modal-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.action-modal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(11, 82, 52, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: #173327;
  font-size: 14px;
  font-weight: 600;
}

.action-modal-item::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(79, 102, 89, 0.3);
}

.action-modal-item.is-active {
  border-color: rgba(9, 214, 111, 0.32);
  background: rgba(9, 214, 111, 0.1);
}

.action-modal-item.is-active::before {
  background: #09d66f;
  box-shadow: 0 0 0 6px rgba(9, 214, 111, 0.16);
}

.action-modal-item.is-done::before {
  background: #0d8d79;
}

.action-modal-item.is-error {
  border-color: rgba(255, 95, 103, 0.3);
  background: rgba(255, 95, 103, 0.08);
}

.action-modal-item.is-error::before {
  background: #ff5f67;
}

.action-modal-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hidden {
  display: none;
}

@media (max-width: 1100px) {
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }

  #programStep,
  #controlStep,
  #downloadStep {
    grid-column: auto;
    grid-row: auto;
  }

  #downloadStep {
    position: static;
  }

}

@media (max-width: 720px) {
  .topbar {
    padding: 12px;
  }

  .shell {
    width: min(100%, calc(100vw - 24px));
    margin: 16px auto 32px;
  }

  .topbar-inner {
    flex-direction: column;
    gap: 12px;
  }

  .upload-panel,
  .work-panel,
  .status-banner {
    padding: 18px;
  }

  .program-picker,
  .section-head {
    align-items: stretch;
  }

  .program-picker {
    flex-direction: column;
  }

  .btn,
  .program-select {
    width: 100%;
  }

  .track-table {
    display: block;
    overflow-x: auto;
  }

  .action-modal {
    padding: 16px;
  }

  .action-modal-card {
    padding: 20px;
  }

  .action-modal-head {
    flex-direction: column;
  }

  .action-modal-actions {
    flex-direction: column;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    transform: scale(0.98);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes glowShift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1.02);
  }
  to {
    transform: translate3d(2%, 1%, 0) scale(1.06);
  }
}

@keyframes spinSweep {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dropPulse {
  0% {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 0.45;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.95;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.25;
  }
}

@keyframes toStepTwo {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.96) translateY(-24px);
  }
}


/* Login and session controls use the original app style. */
.brand-lockup:empty {
  min-height: 0;
}

.logout-form {
  margin: 0;
}

.lock-button {
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
}

.lock-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-shell {
  width: min(460px, 94vw);
}

.login-card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(9, 61, 37, 0.08);
  padding: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 249, 0.92));
  box-shadow: var(--card-shadow);
  animation: panelIn 600ms ease-out both;
}

.login-eyebrow {
  margin: 0 0 8px;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.login-card h1 {
  margin: 0;
  font: 600 36px/1.12 'Poppins', sans-serif;
  letter-spacing: normal;
}

.login-copy {
  margin: 14px 0 24px;
  color: var(--muted-dark);
  font-size: 14px;
  line-height: 1.6;
}

.login-error {
  margin: -8px 0 18px;
  border-radius: var(--radius-md);
  padding: 11px 13px;
  color: #8f2630;
  background: rgba(255, 95, 103, 0.12);
  border: 1px solid rgba(255, 95, 103, 0.2);
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  border: 1px solid rgba(12, 84, 53, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 14px 18px;
  font: 600 15px/1.2 'Poppins', sans-serif;
}

.login-form input:focus {
  outline: none;
  border-color: #0dbb67;
  box-shadow: 0 0 0 3px rgba(13, 187, 103, 0.14);
}

.login-submit {
  width: 100%;
  margin-top: 4px;
}

.login-note {
  margin: 20px 0 0;
  color: var(--muted-dark);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: row;
    justify-content: flex-end;
  }

  .login-card {
    padding: 24px 20px;
  }

  .login-card h1 {
    font-size: 30px;
  }
}

