/*
 * LiveStudios Control Production Desk
 * Consolidated from the verified live portal.
 */

/* Production Desk */
.production-desk-launch {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(102, 238, 171, 0.42);
    border-radius: 999px;
    background:
      linear-gradient(
        145deg,
        rgba(20, 43, 48, 0.94),
        rgba(8, 18, 27, 0.96)
      );
    color: #eefbf5;
    padding: 12px 16px;
    font: inherit;
    font-weight: 750;
    box-shadow:
      0 16px 44px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
  }

  .production-desk-launch-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #65e9aa;
    box-shadow: 0 0 14px rgba(101, 233, 170, 0.76);
  }

  .production-desk-count {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(101, 233, 170, 0.15);
    color: #8bf2bf;
    font-size: 0.76rem;
  }

  .production-desk-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    padding: 24px;
    background:
      radial-gradient(
        circle at top left,
        rgba(27, 95, 145, 0.28),
        transparent 42%
      ),
      rgba(4, 17, 31, 0.68);
    backdrop-filter: blur(18px) saturate(125%);
    overflow: auto;
  }

  .production-desk-overlay[hidden] {
    display: none !important;
  }

  .production-desk-overlay.open {
    display: block;
  }

  .production-desk-shell {
    width: min(1120px, 100%);
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 28px;
    background:
      linear-gradient(
        145deg,
        rgba(18, 53, 82, 0.96),
        rgba(7, 24, 42, 0.98)
      );
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
    overflow: hidden;
  }

  .production-desk-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .production-desk-eyebrow {
    margin-bottom: 8px;
    color: #69eaae;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.17em;
  }

  .production-desk-header h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 300;
    letter-spacing: -0.04em;
  }

  .production-desk-header p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.58);
  }

  .production-desk-close {
    align-self: flex-start;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.055);
    color: white;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
  }

  .production-desk-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .production-desk-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .production-desk-filter,
  .production-desk-refresh {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 255, 255, 0.72);
    padding: 9px 14px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 720;
    cursor: pointer;
  }

  .production-desk-filter.active {
    border-color: rgba(101, 233, 170, 0.52);
    background: rgba(101, 233, 170, 0.13);
    color: #91f3c2;
  }

  .production-desk-list {
    display: grid;
    gap: 12px;
    padding: 24px 30px 36px;
  }

  .production-desk-loading,
  .production-desk-empty,
  .production-desk-error {
    padding: 42px 24px;
    border: 1px dashed rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
  }

  .production-desk-error {
    border-style: solid;
    border-color: rgba(255, 120, 149, 0.34);
    background: rgba(89, 18, 40, 0.32);
    color: #ffdce4;
  }

  .production-job {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background:
      linear-gradient(
        145deg,
        rgba(31, 83, 119, 0.22),
        rgba(12, 38, 63, 0.18)
      );
    overflow: hidden;
  }

  .production-job.open {
    border-color: rgba(101, 233, 170, 0.3);
  }

  .production-job-summary {
    display: grid;
    grid-template-columns:
      minmax(175px, 0.65fr)
      minmax(220px, 1.4fr)
      minmax(150px, 0.75fr)
      auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 18px 20px;
    text-align: left;
    cursor: pointer;
  }

  .production-job-code {
    font-size: 0.9rem;
    font-weight: 850;
    letter-spacing: 0.025em;
  }

  .production-job-title {
    font-size: 1rem;
    font-weight: 720;
  }

  .production-job-client {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.84rem;
  }

  .production-status {
    display: inline-flex;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 820;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    white-space: nowrap;
  }

  .production-status-new {
    background: rgba(104, 189, 255, 0.13);
    color: #9bd2ff;
  }

  .production-status-in-production {
    background: rgba(255, 193, 92, 0.13);
    color: #ffd28b;
  }

  .production-status-awaiting-client-approval {
    background: rgba(145, 116, 255, 0.13);
    color: #c4afff;
  }

  .production-status-approved {
    background: rgba(76, 205, 255, 0.13);
    color: #9de4ff;
  }

  .production-status-insertion-confirmed {
    background: rgba(101, 233, 170, 0.13);
    color: #91f3c2;
  }

  .production-status-archived {
    color: rgba(255, 255, 255, 0.46);
  }

  .production-job-details {
    display: none;
    padding: 0 20px 22px;
  }

  .production-job.open .production-job-details {
    display: block;
  }

  .production-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
  }

  .production-detail-card {
    padding: 15px;
    border-radius: 15px;
    background:
      linear-gradient(
        145deg,
        rgba(22, 69, 104, 0.34),
        rgba(8, 29, 51, 0.42)
      );
  }

  .production-detail-card span {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.43);
    font-size: 0.72rem;
    font-weight: 720;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .production-detail-card strong,
  .production-detail-card p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.5;
  }

  .production-detail-wide {
    grid-column: 1 / -1;
  }

  .production-workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
  }

  .production-status-button {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.72);
    padding: 9px 13px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 760;
    cursor: pointer;
  }

  .production-status-button.current {
    border-color: rgba(101, 233, 170, 0.58);
    background: rgba(101, 233, 170, 0.13);
    color: #91f3c2;
  }

  .production-status-button:disabled {
    cursor: wait;
    opacity: 0.48;
  }

  .production-status-button.updating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-color: rgba(111, 191, 244, 0.56);
    background:
      linear-gradient(
        145deg,
        rgba(57, 147, 201, 0.34),
        rgba(23, 77, 115, 0.32)
      );
    color: #e2f6ff;
    opacity: 1;
  }

  .production-status-spinner {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    border: 2px solid rgba(226, 246, 255, 0.30);
    border-top-color: #e2f6ff;
    border-radius: 50%;
    animation:
      production-status-spin 0.72s linear infinite;
  }

  .production-status-saving {
    flex: 1 0 100%;
    margin-top: 3px;
    color: #9fdcff;
    font-size: 0.78rem;
    font-weight: 680;
  }

  @keyframes production-status-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .production-notes-panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 196, 96, 0.2);
    border-radius: 17px;
    background:
      linear-gradient(
        145deg,
        rgba(38, 91, 125, 0.18),
        rgba(12, 38, 63, 0.22)
      );
  }

  .production-notes-panel h4 {
    margin: 0;
  }

  .production-notes-label {
    margin: 4px 0 13px;
    color: #ffd28b;
    font-size: 0.76rem;
    font-weight: 760;
  }

  .production-note-entry {
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 11px;
    background: rgba(8, 35, 58, 0.46);
  }

  .production-note-meta {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.72rem;
  }

  .production-note-compose {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
    margin-top: 13px;
  }

  .production-note-compose textarea {
    min-height: 76px;
    resize: vertical;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 13px;
    background: rgba(3, 10, 18, 0.6);
    color: white;
    padding: 11px 12px;
    font: inherit;
  }

  .production-note-compose button {
    align-self: end;
    border: 1px solid rgba(255, 196, 96, 0.36);
    border-radius: 999px;
    background: rgba(255, 196, 96, 0.11);
    color: #ffd28b;
    padding: 10px 15px;
    font: inherit;
    font-weight: 760;
    cursor: pointer;
  }

  @media (max-width: 760px) {
    .production-desk-overlay {
      padding: 0;
    }

    .production-desk-shell {
      min-height: 100vh;
      border-radius: 0;
    }

    .production-desk-header,
    .production-desk-toolbar,
    .production-desk-list {
      padding-left: 17px;
      padding-right: 17px;
    }

    .production-job-summary {
      grid-template-columns: 1fr auto;
      gap: 7px 12px;
    }

    .production-job-title,
    .production-job-client {
      grid-column: 1 / -1;
    }

    .production-detail-grid {
      grid-template-columns: 1fr;
    }

    .production-detail-wide {
      grid-column: auto;
    }

    .production-note-compose {
      grid-template-columns: 1fr;
    }

    .production-desk-launch {
      right: 14px;
      bottom: 14px;
    }
  }

  .production-job-owner {
    display: block;
    margin-top: 5px;
    color: #8ff1c0;
    font-size: 0.76rem;
    font-weight: 780;
  }

  .production-history-panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(104, 189, 255, 0.18);
    border-radius: 17px;
    background:
      linear-gradient(
        145deg,
        rgba(30, 100, 145, 0.18),
        rgba(10, 36, 61, 0.22)
      );
  }

  .production-history-panel h4 {
    margin: 0 0 13px;
  }

  .production-history-list {
    display: grid;
    gap: 8px;
  }

  .production-history-entry {
    padding: 10px 12px;
    border-radius: 11px;
    background: rgba(8, 35, 58, 0.46);
  }

  .production-history-action {
    font-size: 0.84rem;
    font-weight: 720;
  }

  .production-history-meta {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.72rem;
  }


  .production-desk-shell,
  .production-job,
  .production-detail-card,
  .production-history-panel,
  .production-notes-panel {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 16px 40px rgba(1, 12, 24, 0.22);
  }

  .production-desk-shell {
    border-color: rgba(111, 191, 244, 0.19);
  }

  .production-job {
    border-color: rgba(108, 186, 238, 0.14);
  }

  .production-job.open {
    border-color: rgba(101, 233, 170, 0.34);
    background:
      linear-gradient(
        145deg,
        rgba(31, 86, 122, 0.28),
        rgba(11, 38, 63, 0.24)
      );
  }


  .production-uploaded-audio-card {
    grid-column: 1 / -1;
  }

  .production-uploaded-audio-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
  }

  .production-uploaded-audio-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 50px;
  }

  .production-uploaded-audio-name {
    min-width: 0;
    color: rgba(255, 255, 255, 0.9);
    overflow-wrap: anywhere;
  }

  .production-uploaded-audio-download {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(111, 191, 244, 0.28);
    border-radius: 13px;
    background:
      linear-gradient(
        145deg,
        rgba(57, 150, 207, 0.34),
        rgba(20, 72, 111, 0.34)
      );
    color: #e1f6ff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 9px 25px rgba(1, 14, 28, 0.2);
    text-decoration: none;
    transition:
      transform 150ms ease,
      border-color 150ms ease,
      box-shadow 150ms ease;
  }

  .production-uploaded-audio-download:hover {
    transform: translateY(-1px);
    border-color: rgba(110, 233, 174, 0.52);
    box-shadow:
      0 0 0 4px rgba(110, 233, 174, 0.07),
      0 10px 27px rgba(1, 14, 28, 0.23);
  }

  .production-uploaded-audio-download svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .production-uploaded-audio-empty {
    color: rgba(255, 255, 255, 0.48);
  }



  .production-history-detail {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

/* Finished Audio Upload */
.production-review-audio-panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(111, 191, 244, 0.20);
    border-radius: 17px;
    background:
      linear-gradient(
        145deg,
        rgba(30, 100, 145, 0.20),
        rgba(10, 36, 61, 0.24)
      );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 14px 34px rgba(1, 13, 27, 0.16);
  }

  .production-review-audio-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
  }

  .production-review-audio-heading h4 {
    margin: 0 0 7px;
  }

  .production-review-audio-heading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.84rem;
    line-height: 1.48;
  }

  .production-review-ready,
  .production-review-missing {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.68rem;
    font-weight: 820;
  }

  .production-review-ready {
    border: 1px solid rgba(110, 233, 174, 0.28);
    background: rgba(48, 164, 110, 0.16);
    color: #9af1c3;
  }

  .production-review-missing {
    border: 1px solid rgba(255, 193, 92, 0.25);
    background: rgba(255, 193, 92, 0.12);
    color: #ffd28b;
  }

  .production-review-audio-controls {
    display: grid;
    justify-items: center;
    gap: 10px;
  }

  .production-review-audio-file-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    margin-bottom: 12px;
  }

  .production-review-file-native {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .production-review-file-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(111, 191, 244, 0.34);
    border-radius: 13px;
    padding: 0 16px;
    background:
      linear-gradient(
        145deg,
        rgba(65, 158, 216, 0.39),
        rgba(24, 82, 123, 0.34)
      );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 8px 24px rgba(3, 30, 52, 0.16);
    color: #e2f6ff;
    font-size: 0.8rem;
    font-weight: 780;
    cursor: pointer;
    transition:
      border-color 150ms ease,
      background 150ms ease,
      transform 150ms ease;
  }

  .production-review-file-button:hover {
    border-color: rgba(136, 211, 255, 0.58);
    background:
      linear-gradient(
        145deg,
        rgba(75, 174, 232, 0.48),
        rgba(27, 94, 140, 0.40)
      );
    transform: translateY(-1px);
  }

  .production-review-file:focus-visible
    + .production-review-file-button {
    outline: 2px solid #90ddff;
    outline-offset: 3px;
  }

  .production-review-file-name {
    max-width: min(100%, 360px);
    overflow: hidden;
    color: rgba(226, 246, 255, 0.68);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .production-review-upload {
    min-height: 42px;
    border: 1px solid rgba(111, 191, 244, 0.27);
    border-radius: 13px;
    padding: 0 15px;
    background:
      linear-gradient(
        145deg,
        rgba(57, 147, 201, 0.32),
        rgba(23, 77, 115, 0.30)
      );
    color: #e2f6ff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 780;
    cursor: pointer;
  }

  .production-review-upload:disabled {
    opacity: 0.58;
    cursor: wait;
  }

  .production-review-message {
    min-height: 18px;
    margin-top: 10px;
    color: #98f2c5;
    font-size: 0.78rem;
    font-weight: 650;
  }

  @media (max-width: 680px) {
    .production-review-audio-heading {
      display: grid;
    }

    .production-review-ready,
    .production-review-missing {
      justify-self: start;
    }

    .production-review-upload {
      width: min(100%, 260px);
    }

    .production-review-audio-file-row {
      flex-wrap: wrap;
    }
  }

  .production-uploaded-audio-row {
    flex-wrap: wrap;
  }

  @media (max-width: 620px) {
    .production-uploaded-audio-name {
      flex: 1 1 180px;
    }
  }
