/* ==========================================================================
   Board cards: rich preview (title, review state, deadline + upload date,
   deliverables, team, next-step hint). Light theme first, with fallbacks.
   ========================================================================== */

#main-app .kanban-card { padding: 14px 14px 13px; }

#main-app .kanban-card .vc-thumb {
    position: relative;
    margin: -2px -2px 12px;
    border-radius: 9px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #ECECEE;
}
#main-app .kanban-card .vc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#main-app .kanban-card .vc-thumb span {
    position: absolute;
    left: 8px; bottom: 8px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: #fff;
    background: rgba(25, 25, 28, 0.55);
    backdrop-filter: blur(6px);
    padding: 3px 7px;
    border-radius: 6px;
}

#main-app .kanban-card .vc-title {
    font-size: 14.5px;
    line-height: 1.38;
    font-weight: 650;
    color: var(--text-primary);
    letter-spacing: -0.005em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Review state */
#main-app .kanban-card .vc-review {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px;
    font-size: 11.5px; font-weight: 650;
    padding: 3px 9px 3px 8px;
    border-radius: 999px;
}
#main-app .kanban-card .vc-review i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#main-app .kanban-card .vc-review.is-progress  { color: #5C5C68; background: #F1F1F3; }
#main-app .kanban-card .vc-review.is-review    { color: #3E6FB5; background: #EAF1FB; }
#main-app .kanban-card .vc-review.is-revisions { color: #B94A4A; background: #FBEDED; }
#main-app .kanban-card .vc-review.is-approved  { color: #2F8A5E; background: #E9F5EF; }

/* Dates */
#main-app .kanban-card .vc-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
}
#main-app .kanban-card .vc-date {
    display: flex; flex-direction: column; gap: 1px;
    background: #F5F5F6;
    border: 1px solid #EBEBEE;
    border-radius: 9px;
    padding: 7px 9px 7px;
    min-width: 0;
}
#main-app .kanban-card .vc-date-label {
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: #81818F;
}
#main-app .kanban-card .vc-date-val {
    font-size: 13px; font-weight: 700; color: var(--text-primary);
    white-space: nowrap;
}
#main-app .kanban-card .vc-date-val .vc-unset { color: #A2A2AC; font-weight: 600; }
#main-app .kanban-card .vc-date-note { font-size: 11px; font-weight: 600; color: #81818F; white-space: nowrap; }
#main-app .kanban-card .vc-date-up { background: #F1F1F2; border-color: #E3E3E6; }
#main-app .kanban-card .vc-date-up .vc-date-label { color: #1A1A1D; }
#main-app .kanban-card .vc-date.is-soon { background: #FDF6EA; border-color: #F3E4C6; }
#main-app .kanban-card .vc-date.is-soon .vc-date-note,
#main-app .kanban-card .vc-date.is-soon .vc-date-label { color: #9A6B12; }
#main-app .kanban-card .vc-date.is-late { background: #FCEFEF; border-color: #F2D6D6; }
#main-app .kanban-card .vc-date.is-late .vc-date-note,
#main-app .kanban-card .vc-date.is-late .vc-date-label { color: #B94A4A; }
#main-app .kanban-card .vc-date.is-done .vc-date-note { color: #2F8A5E; }

/* Footer: deliverables + team */
#main-app .kanban-card .vc-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 12px;
    min-height: 24px;
}
#main-app .kanban-card .vc-steps { display: flex; gap: 4px; min-width: 0; }
#main-app .kanban-card .vc-step {
    font-size: 10.5px; font-weight: 650;
    color: #A2A2AC;
    border: 1px dashed #D8D8DC;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}
#main-app .kanban-card .vc-step.is-on {
    color: #121214;
    background: #EEEEF0;
    border: 1px solid #DEDEE2;
}
#main-app .kanban-card .vc-team { display: flex; flex-shrink: 0; }
#main-app .kanban-card .vc-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--a, #1A1A1D);
    color: #fff !important;
    font-size: 10px; font-weight: 750; letter-spacing: 0.01em;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    margin-left: -3px;
    box-shadow: 0 1px 3px rgba(25, 25, 28, 0.18);
}
#main-app .kanban-card .vc-avatar:first-child { margin-left: 0; }

/* Next-step hint */
#main-app .kanban-card .vc-hint {
    display: flex; align-items: center; gap: 7px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #EEEEF0;
    font-size: 11.5px; font-weight: 650;
    color: #9A6B12;
}
#main-app .kanban-card .vc-hint i {
    width: 6px; height: 6px; border-radius: 50%;
    background: #D9A54A;
    box-shadow: 0 0 0 3px rgba(217, 165, 74, 0.18);
    flex-shrink: 0;
}

/* ==========================================================================
   Responsive board: the 6 stages share the available width instead of
   fixed 280px columns. Only on really narrow screens does it scroll.
   ========================================================================== */
#main-app .sidebar { flex-shrink: 0; }

#main-app #view-pipeline .kanban-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(148px, 1fr));
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #CACAD0 transparent;
}
#main-app #view-pipeline .kanban-column {
    min-width: 0;
    max-width: none;
    width: auto;
    scroll-snap-align: start;
}
#main-app #view-pipeline .kanban-board::-webkit-scrollbar { height: 8px; }
#main-app #view-pipeline .kanban-board::-webkit-scrollbar-thumb { background: #CACAD0; border-radius: 8px; }
#main-app #view-pipeline .kanban-board::-webkit-scrollbar-track { background: transparent; }

/* Card internals adapt to narrower columns */
#main-app .kanban-card .vc-foot { flex-wrap: wrap; row-gap: 8px; }
#main-app .kanban-card .vc-steps { flex-wrap: wrap; }
#main-app .kanban-column .column-header h3 { min-width: 0; white-space: normal; line-height: 1.25; }
#main-app #view-pipeline .kanban-column { container-type: inline-size; }

@media (max-width: 1500px) {
    #main-app #view-pipeline { padding: 18px !important; }
    #main-app #view-pipeline .kanban-board { gap: 12px; }
    #main-app .kanban-column .column-header { padding: 14px 12px 6px !important; }
    #main-app .kanban-column .column-header h3 { font-size: 13px !important; }
    #main-app #view-pipeline .column-body { padding: 6px 8px 10px !important; }
    #main-app .kanban-card { padding: 12px 11px 11px; }
    #main-app .kanban-card .vc-title { font-size: 13.5px; }
    #main-app .kanban-card .vc-date { padding: 6px 7px; }
    #main-app .kanban-card .vc-date-val { font-size: 12.5px; }
    #main-app .kanban-card .vc-step { padding: 2px 5px; font-size: 10px; }
}

@media (max-width: 1500px) {
    #main-app .sidebar { width: 232px; }
    #main-app .sidebar-logo { padding-left: 18px !important; padding-right: 10px !important; gap: 9px !important; }
    #main-app .sidebar-logo span { font-size: 14px !important; }
    #main-app .sidebar-mark { width: 25px; }
}

@media (max-width: 1360px) {
    #main-app .sidebar-nav { padding: 0 10px; }
    #main-app .nav-btn { font-size: 13.5px !important; padding: 10px 11px !important; }
    #main-app .top-header { padding-left: 24px !important; padding-right: 24px !important; }
}

/* Narrow columns: stack the two date boxes and tighten the card */
@container (max-width: 205px) {
    #main-app .kanban-card .vc-dates { grid-template-columns: 1fr; gap: 5px; }
    #main-app .kanban-card .vc-date {
        flex-direction: row; align-items: baseline; flex-wrap: wrap;
        column-gap: 6px; padding: 6px 8px;
    }
    #main-app .kanban-card .vc-date-label { width: 100%; }
    #main-app .kanban-card .vc-date-note { margin-left: auto; }
    #main-app .kanban-card .vc-title { font-size: 13px; }
    #main-app .kanban-card .vc-review { font-size: 11px; }
    #main-app .kanban-card .vc-hint { font-size: 11px; align-items: flex-start; }
    #main-app .kanban-card .vc-hint i { margin-top: 4px; }
}

/* Keep cards aligned when some stage names wrap to two lines */
@media (max-width: 1500px) {
    #main-app #view-pipeline .column-header { min-height: 56px; align-items: center; }
}

/* Small laptops */
@media (max-width: 1240px) {
    #main-app .sidebar { width: 204px; }
    #main-app .sidebar-logo { padding-left: 14px !important; padding-right: 8px !important; gap: 8px !important; }
    #main-app .sidebar-logo span { font-size: 12.5px !important; }
    #main-app .sidebar-mark { width: 22px; }
    #main-app .nav-btn { font-size: 13px !important; padding: 9px 10px !important; }
    #main-app #view-pipeline { padding: 14px !important; }
    #main-app #view-pipeline .kanban-board { gap: 10px; grid-template-columns: repeat(7, minmax(136px, 1fr)); padding-right: 6px !important; }
    #main-app .kanban-column .column-header { padding: 12px 10px 6px !important; }
    #main-app #view-pipeline .column-body { padding: 6px 6px 10px !important; }
    #main-app .kanban-card { padding: 11px 10px 10px; }
}

/* Sidebar items always on one line */
#main-app .nav-btn { white-space: nowrap; }
@media (max-width: 1500px) {
    #main-app .sidebar-nav { padding: 0 12px; }
    #main-app .nav-btn { font-size: 14px !important; padding: 10px 12px !important; }
}
@media (max-width: 1240px) {
    #main-app .sidebar-nav { padding: 0 10px; }
    #main-app .nav-btn { font-size: 13px !important; padding: 9px 10px !important; }
    #main-app .nav-btn.active::before { width: 14px; margin-right: 7px; }
}

/* Own thumbnail in the video modal */
#details-modal .own-thumb { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 10px; border: 1px solid #E4E4E7; border-radius: 12px; background: #FAFAFA; }
#details-modal .own-thumb-box { position: relative; flex: 0 0 160px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #F0F0F2; border: 1px dashed #CFCFD4; cursor: pointer; outline: none; transition: border-color .15s, box-shadow .15s; }
#details-modal .own-thumb-box:hover, #details-modal .own-thumb-box:focus-visible, #details-modal .own-thumb-box.drag { border-color: #18181B; box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08); }
#details-modal .own-thumb.has-img .own-thumb-box { border-style: solid; border-color: #E4E4E7; }
#details-modal .own-thumb-box img { width: 100%; height: 100%; object-fit: cover; display: none; }
#details-modal .own-thumb.has-img .own-thumb-box img { display: block; }
#details-modal .own-thumb-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #A1A1AA; font-size: 26px; }
#details-modal .own-thumb.has-img .own-thumb-empty { display: none; }
#details-modal .own-thumb-busy { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; background: rgba(24, 24, 27, 0.55); backdrop-filter: blur(2px); }
#details-modal .own-thumb.busy .own-thumb-busy { display: flex; }
#details-modal .own-thumb-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#details-modal .own-thumb-info b { font-size: 13px; color: #18181B; }
#details-modal .own-thumb-info span { font-size: 12px; line-height: 1.45; color: #71717A; }
#details-modal .own-thumb-actions { display: flex; gap: 8px; margin-top: 6px; }
#details-modal .own-thumb-actions .btn { padding: 5px 10px; font-size: 12px; height: auto; display: inline-flex; align-items: center; gap: 5px; }
#details-modal .own-thumb-actions .btn span { font-size: 12px; color: inherit; line-height: 1; }
#details-modal .own-thumb:not(.has-img) #own-thumb-remove { display: none; }
#details-modal .own-thumb.read-only #own-thumb-upload, #details-modal .own-thumb.read-only #own-thumb-remove, #details-modal .own-thumb.read-only #own-thumb-note { display: none; }
#details-modal .own-thumb:not(.has-img) #own-thumb-download { display: none; }
#details-modal .own-thumb.read-only .own-thumb-box { cursor: default; }

/* Stage deadline chip in the column header */
#main-app #view-pipeline .kanban-column[data-status] .column-header { flex-wrap: wrap; row-gap: 4px; align-content: flex-start; }
#main-app #view-pipeline .kanban-column[data-status] .column-header:has(.col-limit) { min-height: 74px; }
#main-app .column-header .col-limit {
    order: 3; flex-basis: 100%;
    display: flex; align-items: center; gap: 4px;
    margin-left: 17px;
    font-size: 11.5px; font-weight: 600; color: #6B6B76; line-height: 1.2;
}
#main-app .column-header .col-limit.is-off { color: #A1A1AA; font-weight: 500; }
#main-app .column-header .col-limit i { font-size: 12.5px; }

/* Stage deadlines modal */
#stage-modal.sd-modal {
    width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
    flex-direction: column; padding: 0; overflow: hidden;
    background: #FFFFFF; border: 1px solid #E1E1E5; border-radius: 18px;
    box-shadow: 0 1px 2px rgba(18, 18, 20, .06), 0 24px 60px -18px rgba(18, 18, 20, .28); color: #19191C;
}
#stage-modal .tm-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 16px; margin: 0; border-bottom: 1px solid #E9E9EB; }
#stage-modal .tm-header h2 { margin: 0; font-size: 18px; font-weight: 700; color: #19191C; }
#stage-modal .tm-sub { margin: 4px 0 0; font-size: 13px; color: #7C7C8B; }
#stage-modal .close-btn { color: #7C7C8B; }
#stage-modal .sd-body { padding: 14px 24px 6px; overflow-y: auto; }
#stage-modal .sd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #F0F0F2; cursor: default; }
#stage-modal .sd-name { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #19191C; }
#stage-modal .sd-name i { width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
#stage-modal .sd-input { display: flex; align-items: center; gap: 8px; }
#stage-modal .sd-input input { width: 64px; padding: 7px 10px; font-size: 14px; text-align: right; border: 1px solid #DCDCE0; border-radius: 8px; background: #FAFAFA; color: #19191C; font-family: inherit; }
#stage-modal .sd-input input:focus { outline: none; border-color: #18181B; background: #fff; box-shadow: 0 0 0 3px rgba(24, 24, 27, .08); }
#stage-modal .sd-input em { font-style: normal; font-size: 12.5px; color: #7C7C8B; width: 30px; }
#stage-modal .sd-note { margin: 12px 0 8px; font-size: 12.5px; line-height: 1.5; color: #7C7C8B; }
#stage-modal .sd-foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid #E9E9EB; }
#stage-modal .sd-msg { flex: 1; font-size: 12px; color: #C0392B; }

/* ---------- Video modal: inspiration / source videos list ---------- */
.insp-count { margin-left: 4px; font-weight: 600; color: var(--text-muted, #81818F); }
.insp-list { display: flex; flex-direction: column; gap: 6px; }
.insp-empty { padding: 10px 12px; font-size: 13px; color: var(--text-muted, #81818F); border: 1px dashed var(--border-color, #EAEAEC); border-radius: 12px; }
.insp-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border: 1px solid var(--border-color, #EAEAEC); border-radius: 12px; background: var(--bg-secondary, #fff); transition: border-color .15s, box-shadow .15s; }
.insp-row:hover { border-color: #D4D4D8; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); }
.insp-thumb { flex: 0 0 auto; width: 64px; height: 36px; border-radius: 7px; overflow: hidden; background: #F1F1F3; display: flex; align-items: center; justify-content: center; color: var(--text-muted, #81818F); }
.insp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.insp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.insp-main b { font-size: 13px; font-weight: 600; color: var(--primary, #1A1A1D); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-main span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted, #81818F); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-main em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: #F1F1F3; color: #6B6B78; }
.insp-main:hover b { text-decoration: underline; }
.insp-score { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: #F1F1F3; color: #6B6B78; }
.insp-score.good { background: #E8F5EE; color: #2E7D52; }
.insp-score.mid { background: #FBF3E3; color: #A0731F; }
.insp-score.low { background: #FBEAEA; color: #B04848; }
.insp-x { flex: 0 0 auto; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: #A1A1AA; font-size: 17px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.insp-row:hover .insp-x { opacity: 1; }
.insp-x:hover { background: #FBEAEA; color: #B04848; }
.insp-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; padding: 4px 8px; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted, #81818F); cursor: pointer; border-radius: 6px; }
.insp-more:hover { background: #F1F1F3; color: var(--primary, #1A1A1D); }
.insp-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 0 12px; border: 1px dashed var(--border-color, #E0E0E4); border-radius: 12px; color: var(--text-muted, #81818F); }
.insp-add:focus-within { border-style: solid; border-color: #A1A1AA; }
.insp-add input { flex: 1; min-width: 0; height: 38px; border: 0; outline: none; background: transparent; font: inherit; font-size: 13px; color: var(--primary, #1A1A1D); }
@media (hover: none) { .insp-x { opacity: 1; } }
#details-modal .insp-add input#insp-add-input { height: 38px; padding: 0; margin: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0; }

/* ---------- Video modal: reporter method links (several Loom / voice note links) ---------- */
.vl-list { display: flex; flex-direction: column; gap: 6px; }
.vl-row { display: flex; align-items: center; gap: 6px; }
#details-modal .vl-row .vl-input { flex: 1; min-width: 0; width: auto; margin-bottom: 0; }
.vl-btn { flex: 0 0 auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-color, #EAEAEC); border-radius: 10px; background: var(--bg-secondary, #fff); color: #6B6B78; font-size: 15px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.vl-btn:hover { background: #F1F1F3; color: var(--primary, #1A1A1D); }
.vl-del:hover { background: #FBEAEA; border-color: #F3CFCF; color: #B04848; }
.vl-add { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 10px; border: 1px dashed var(--border-color, #E0E0E4); border-radius: 10px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted, #81818F); cursor: pointer; }
.vl-add:hover { border-style: solid; border-color: #A1A1AA; color: var(--primary, #1A1A1D); }

/* ---------- Video number (#1, #2…) on the card and in the modal ---------- */
#main-app .kanban-card .vc-thumb .vc-numtag { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #fff; background: rgba(25, 25, 28, 0.55); backdrop-filter: blur(6px); padding: 2px 7px; border-radius: 6px; line-height: 16px; }
#main-app .kanban-card .vc-numline { font-size: 11px; font-weight: 800; color: var(--text-muted, #81818F); margin: -2px 0 4px; }
#details-modal .modal-header { gap: 10px; }
#details-modal .vn-wrap { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 8px; border: 1px solid var(--border-color, #EAEAEC); border-radius: 10px; color: var(--text-muted, #81818F); font-weight: 700; font-size: 15px; cursor: text; }
#details-modal .vn-wrap input { width: 42px; height: 30px; padding: 0; margin: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; font: inherit; font-size: 16px; color: var(--text-primary, #1A1A1D); outline: none; -moz-appearance: textfield; }
#details-modal .vn-wrap input::-webkit-outer-spin-button, #details-modal .vn-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Inspiration: choose which thumbnail the card shows ---------- */
.insp-row.is-card { border-color: #CFC8F3; background: #FAF9FF; }
.insp-card { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: #EEEBFB; color: #5B4BC4; }
.insp-pick { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-color, #EAEAEC); border-radius: 7px; background: #fff; color: #81818F; font-size: 14px; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.insp-row:hover .insp-pick { opacity: 1; }
.insp-pick:hover { background: #EEEBFB; border-color: #CFC8F3; color: #5B4BC4; }
@media (hover: none) { .insp-pick { opacity: 1; } }

/* ---------- Funnel stage label on the card (between title and dates) ---------- */
#main-app .kanban-card .vc-funnel-row { margin: -4px 0 10px; }
#main-app .kanban-card .vc-funnel { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: #6B6B78; }
#main-app .kanban-card .vc-funnel i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#main-app .kanban-card .vc-funnel-top i { background: #3E8FB0; }
#main-app .kanban-card .vc-funnel-middle i { background: #D49A3A; }
#main-app .kanban-card .vc-funnel-bottom i { background: #3FA57A; }

/* Stage modal: board defaults (thumbnail request doc) */
#stage-modal .sd-sep { height: 1px; background: #E9E9EB; margin: 14px 0 12px; }
#stage-modal .sd-field { display: flex; flex-direction: column; gap: 8px; }
#stage-modal .sd-field input { width: 100%; box-sizing: border-box; margin: 0; padding: 10px 12px; font-size: 13.5px; }
#stage-modal .sd-check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: #19191C; margin: 4px 0 6px; cursor: pointer; }
#stage-modal .sd-check input { margin-top: 2px; }

/* ===== Delivery cards (video modal): one coloured card per delivery ===== */
#details-modal .dl-card { --dl: #6b7280; --dl-rgb: 107,114,128; margin-top: 18px; padding: 14px 16px 16px; border-radius: 12px; border: 1px solid rgba(var(--dl-rgb), .28); border-left: 4px solid var(--dl); background: rgba(var(--dl-rgb), .07); }
#details-modal .dl-outline { --dl: #8b5cf6; --dl-rgb: 139,92,246; }
#details-modal .dl-script { --dl: #3b82f6; --dl-rgb: 59,130,246; }
#details-modal .dl-rec { --dl: #f59e0b; --dl-rgb: 245,158,11; }
#details-modal .dl-thumb { --dl: #ec4899; --dl-rgb: 236,72,153; }
#details-modal .dl-edit { --dl: #22c55e; --dl-rgb: 34,197,94; }
#details-modal .dl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#details-modal .dl-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--dl); }
#details-modal .dl-title i { font-size: 17px; }
#details-modal .dl-open { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 8px; cursor: pointer; color: var(--dl); background: rgba(var(--dl-rgb), .12); border: 1px solid rgba(var(--dl-rgb), .35); transition: background .15s; }
#details-modal .dl-open:hover { background: rgba(var(--dl-rgb), .22); }
#details-modal .dl-sub { display: flex; align-items: center; gap: 6px; margin: 6px 0 10px; font-size: 12px; opacity: .75; }
#details-modal .dl-sub span { opacity: .6; }
#details-modal .dl-sub-inline { margin: 0; }
#details-modal .dl-input { width: 100%; margin-bottom: 0; }
#details-modal .dl-nested { margin-top: 14px; padding: 10px 12px 12px; border-radius: 10px; border: 1px dashed rgba(var(--dl-rgb), .4); background: rgba(var(--dl-rgb), .06); }
#details-modal .dl-nested .dl-head { margin-bottom: 8px; }
#details-modal .dl-card .vl-add { margin-top: 8px; }

/* ---------- Stages that belong together: one line over the team step and the client step ---------- */
#main-app #view-pipeline .kanban-board { --kb-gap: 16px; --kb-pair: #D9A54A; }
@media (max-width: 1500px) { #main-app #view-pipeline .kanban-board { --kb-gap: 12px; } }
@media (max-width: 1240px) { #main-app #view-pipeline .kanban-board { --kb-gap: 10px; } }
#main-app #view-pipeline .kanban-column[data-pair] { position: relative; }
#main-app #view-pipeline .kanban-column[data-pair]::before { content: ''; position: absolute; top: -1px; height: 4px; background: var(--kb-pair); z-index: 2; }
#main-app #view-pipeline .kanban-column[data-pair="start"]::before { left: 18px; right: calc(-1 * (var(--kb-gap) + 1px)); border-radius: 4px 0 0 4px; }
#main-app #view-pipeline .kanban-column[data-pair="end"]::before { left: -1px; right: 18px; border-radius: 0 4px 4px 0; }
#main-app #view-pipeline .kanban-column[data-pair="start"]::after {
    content: attr(data-pair-label); position: absolute; z-index: 3; top: 7px; right: calc(-1 * (var(--kb-gap) / 2) - 1px); transform: translateX(50%);
    padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.5; white-space: nowrap;
    color: #8A6414; background: #FBF1DC; border: 1px solid #EBCF97;
}
#main-app #view-pipeline .kanban-column[data-pair="start"][data-pair-label=""]::after { display: none; }

/* ---------- Video modal: Auto / Fixed tag next to the upload date ---------- */
#details-modal .ud-auto { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-weight: 600; }
#details-modal .ud-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: #F1F1F3; color: #6B6B78; }
#details-modal .ud-pill.is-auto { background: #E8F5EE; color: #2E7D52; }
#details-modal .ud-reset { border: 0; background: transparent; padding: 0; font: inherit; font-size: 11.5px; font-weight: 600; color: #2D6FA8; cursor: pointer; text-decoration: underline; }

/* ---------- Deadlines modal: upload rhythm + paired stages ---------- */
#stage-modal .sd-cad { padding: 4px 0 12px; border-bottom: 1px solid #E9E9EB; margin-bottom: 8px; }
#stage-modal .sd-cad-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; font-weight: 700; color: #19191C; }
#stage-modal .sd-cad .sd-note { margin: 8px 0 0; }
#stage-modal .sd-group { margin: 6px 0; padding: 2px 0 8px 12px; border-left: 4px solid #D9A54A; border-radius: 4px; background: linear-gradient(90deg, rgba(217, 165, 74, .09), transparent 70%); }
#stage-modal .sd-group .sd-row:first-child { padding-top: 6px; }
#stage-modal .sd-group .sd-row:nth-child(2) { border-bottom: 0; }
#stage-modal .sd-total { font-size: 12px; font-weight: 700; color: #8A6414; padding-top: 2px; min-height: 16px; }
#stage-modal .sd-buffer { margin-top: 6px; }

/* Single stages (Record, Editing): own line with the days, like the pairs */
#main-app #view-pipeline .kanban-column[data-pair="single"]::before { left: 18px; right: 18px; border-radius: 4px; background: var(--st); }
#main-app #view-pipeline .kanban-column[data-pair="single"]::after {
    content: attr(data-pair-label); position: absolute; z-index: 3; top: -7px; left: 50%; transform: translateX(-50%);
    padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.5; white-space: nowrap;
    color: #3F3F46; background: #fff; border: 1px solid #D4D4D9;
}
#main-app #view-pipeline .kanban-column[data-pair="single"][data-pair-label=""]::after { display: none; }
/* Pair label: same spot as the single ones (centered on the line, over the gap) */
#main-app #view-pipeline .kanban-column[data-pair="start"]::after { top: -7px; }

#stage-modal .sd-permonth { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #2E7D52; background: #E8F5EE; }
#stage-modal .sd-permonth b { font-size: 13.5px; }

/* ---------- No flicker while scrolling the board ----------
   Cards moved under the mouse while scrolling, so every card flipped its :hover (lift + big shadow transition)
   and the blurred labels on the thumbnails (backdrop-filter) were repainted each frame.
   Hover is paused while scrolling (see app.js), nothing moves on hover, and the labels are solid. */
#main-app .kanban-card { transition: border-color .15s ease, box-shadow .15s ease; }
#main-app .kanban-card:hover { transform: none; }
#main-app .kanban-card.dragging { transform: scale(0.95); opacity: .5; }
#main-app .kanban-card .vc-thumb span,
#main-app .kanban-card .vc-thumb .vc-numtag { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(25, 25, 28, 0.72); }
#main-app #view-pipeline.is-scrolling .kanban-card { pointer-events: none; }

/* Review label stays readable when the column is narrow (it wraps inside a soft box instead of a stretched pill) */
#main-app .kanban-card .vc-review { align-items: flex-start; border-radius: 10px; line-height: 1.25; padding: 4px 9px 4px 8px; }
#main-app .kanban-card .vc-review i { margin-top: 5px; flex: 0 0 6px; }

/* ==========================================================================
   No flicker while scrolling (board + video card popup)
   1. The popup was centered with translate(-50%, -50%). Its height is 85vh, so it often sat on half pixels:
      text shimmered/flickered on every scroll step. Now it is centered with margin:auto (whole pixels, no transform).
   2. The blurred backdrop (backdrop-filter) behind the popup was repainted on every scroll step: now a plain dim.
   3. Inputs had "transition: all" + a lift on focus: hovering over them while scrolling animated every field.
   4. Board: the columns are one row that fills the board, so a full column scrolls inside itself
      (before, the grid row grew with the cards and the lower cards were cut off).
   ========================================================================== */
#details-modal.modal { top: 0; right: 0; bottom: 0; left: 0; margin: auto; transform: none; }
.modal-overlay { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(28, 28, 32, 0.42) !important; }
#details-modal .form-group input, #details-modal .form-group select, #details-modal .form-group textarea { transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
#details-modal .form-group input:focus, #details-modal .form-group select:focus, #details-modal .form-group textarea:focus { transform: none; }
#details-modal.is-scrolling .modal-body * { pointer-events: none; }
#main-app #view-pipeline .kanban-board { grid-template-rows: minmax(0, 1fr); }
#main-app #view-pipeline .kanban-column { min-height: 0; }
#main-app #view-pipeline .column-body { overscroll-behavior: contain; }

/* ===== Luxury delivery cards (video modal) ===== */
#details-modal .dl-card {
    position: relative; overflow: visible; flex: 0 0 auto; min-height: min-content; margin-top: 20px; padding: 20px 22px 22px;
    border-radius: 18px; border: 1px solid rgba(var(--dl-rgb), .30); border-left: 1px solid rgba(var(--dl-rgb), .30);
    background: linear-gradient(155deg, rgba(var(--dl-rgb), .035) 0%, rgba(var(--dl-rgb), .115) 100%);
    box-shadow: 0 1px 3px rgba(20,20,30,.08), 0 14px 32px -12px rgba(var(--dl-rgb), .50);
}
#details-modal .dl-card::before {
    content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 5px; border-radius: 18px 0 0 18px;
    background: linear-gradient(180deg, rgba(var(--dl-rgb), 1), rgba(var(--dl-rgb), .45));
}
#details-modal .dl-title { gap: 11px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; color: #1A1A1D; }
#details-modal .dl-title i {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px; color: #fff; border-radius: 11px;
    background: linear-gradient(145deg, rgba(var(--dl-rgb), 1), rgba(var(--dl-rgb), .72));
    box-shadow: 0 6px 14px -6px rgba(var(--dl-rgb), .7), inset 0 1px 0 rgba(255,255,255,.35);
}
#details-modal .dl-open {
    padding: 6px 13px; font-size: 11.5px; font-weight: 700; border-radius: 999px; color: var(--dl);
    background: #fff; border: 1px solid rgba(var(--dl-rgb), .38); box-shadow: 0 1px 3px rgba(20,20,30,.08), 0 4px 10px -6px rgba(var(--dl-rgb), .45);
    transition: background .18s, box-shadow .18s, transform .18s;
}
#details-modal .dl-open:hover { background: rgba(var(--dl-rgb), .1); box-shadow: 0 6px 14px -8px rgba(var(--dl-rgb), .6); transform: translateY(-1px); }
#details-modal .dl-sub { margin: 10px 0 12px; font-size: 12px; font-weight: 500; color: #7B7B88; opacity: 1; }
#details-modal .dl-sub i { color: rgba(var(--dl-rgb), .9); }
#details-modal .dl-sub span { opacity: .5; }
#details-modal .dl-card .login-input, #details-modal .dl-card .dl-input, #details-modal .dl-card .vl-input {
    height: 46px; padding: 0 16px; border-radius: 13px; font-size: 14px;
    background: #fff; border: 1px solid rgba(var(--dl-rgb), .22); box-shadow: 0 1px 3px rgba(20,20,30,.07), 0 4px 10px -6px rgba(var(--dl-rgb), .35);
    transition: border-color .18s, box-shadow .18s;
}
#details-modal .dl-card .login-input:focus, #details-modal .dl-card .dl-input:focus, #details-modal .dl-card .vl-input:focus {
    outline: none; border-color: rgba(var(--dl-rgb), .65); box-shadow: 0 0 0 4px rgba(var(--dl-rgb), .14);
}
#details-modal .dl-nested {
    margin-top: 18px; padding: 14px 16px 16px; border-radius: 14px;
    border: 1px solid rgba(var(--dl-rgb), .28); background: rgba(255,255,255,.72);
    box-shadow: 0 1px 3px rgba(20,20,30,.06), 0 8px 18px -12px rgba(var(--dl-rgb), .45);
}
#details-modal .dl-nested .dl-sub-inline { font-size: 12.5px; color: #55555F; }
#details-modal .dl-nested .dl-sub-inline b { color: #1A1A1D; font-weight: 700; }
#details-modal .dl-card .vl-list { gap: 8px; }
#details-modal .dl-card .vl-row { gap: 8px; }
#details-modal .dl-card .vl-btn {
    width: 46px; height: 46px; border-radius: 13px; background: #fff; border: 1px solid rgba(var(--dl-rgb), .22);
    box-shadow: 0 1px 3px rgba(20,20,30,.07), 0 4px 10px -6px rgba(var(--dl-rgb), .35); transition: background .18s, box-shadow .18s, transform .18s, color .18s;
}
#details-modal .dl-card .vl-btn:hover { background: rgba(var(--dl-rgb), .08); color: var(--dl); transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(var(--dl-rgb), .6); }
#details-modal .dl-card .vl-del:hover { background: #FBEAEA; border-color: #F3CFCF; color: #B04848; box-shadow: none; }
#details-modal .dl-card .vl-add {
    margin-top: 10px; padding: 8px 14px; border-radius: 999px; border: 1px dashed rgba(var(--dl-rgb), .45);
    color: var(--dl); background: rgba(var(--dl-rgb), .05); font-weight: 700; transition: background .18s, border-style .18s;
}
#details-modal .dl-card .vl-add:hover { background: rgba(var(--dl-rgb), .12); border-style: solid; border-color: rgba(var(--dl-rgb), .6); color: var(--dl); }

#details-modal .dl-nested, #details-modal .dl-head, #details-modal .dl-sub, #details-modal .dl-input { flex-shrink: 0; }

/* ---------- Inspiration: card thumbnail can be switched off ---------- */
.insp-card.is-btn { border: 0; font-family: inherit; cursor: pointer; transition: background .15s, color .15s; }
.insp-card.is-btn:hover { background: #E2DCF7; color: #3F31A0; }
.insp-cardoff { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border: 1px dashed var(--border-color, #E0E0E4); border-radius: 12px; font-size: 12.5px; color: var(--text-muted, #81818F); }
.insp-cardoff i { font-size: 16px; }
.insp-cardoff span { flex: 1 1 auto; }
.insp-cardoff button { flex: 0 0 auto; border: 0; background: transparent; font: inherit; font-weight: 700; color: #5B4BC4; cursor: pointer; padding: 0; }
.insp-cardoff button:hover { text-decoration: underline; }
.insp-row:first-child .insp-pick { opacity: 1; }

/* ===== Stage / review / funnel: one connected grey block ===== */
#details-modal .stage-review-grid {
    padding: 16px 16px 18px; border-radius: 16px;
    background: linear-gradient(160deg, #F3F3F6 0%, #E7E7EC 100%);
    border: 1px solid #D6D6DD;
    box-shadow: 0 1px 3px rgba(20,20,30,.08), 0 12px 26px -14px rgba(40,40,60,.40), inset 0 1px 0 rgba(255,255,255,.7);
}
#details-modal .stage-review-grid .luxury-label { color: #4A4A55; }
#details-modal .stage-review-grid select.login-input {
    background-color: #fff; border: 1px solid #D2D2DA; border-radius: 12px;
    box-shadow: 0 1px 3px rgba(20,20,30,.08), 0 4px 10px -6px rgba(40,40,60,.30);
    transition: border-color .15s, box-shadow .15s;
}
#details-modal .stage-review-grid select.login-input:focus { outline: none; border-color: #8A8A98; box-shadow: 0 0 0 4px rgba(90,90,110,.15); }

/* Delivery card title: the editor's name next to "Video Delivery" */
#details-modal .dl-title .dl-who { font-style: normal; font-weight: 700; font-size: 12px; color: var(--dl); background: rgba(var(--dl-rgb), .12); border: 1px solid rgba(var(--dl-rgb), .30); padding: 3px 10px; border-radius: 999px; margin-left: 2px; }

/* ===== Funnel stage sits on its own, under the grey block ===== */
#details-modal .funnel-group { padding: 0 2px; }

/* ===== Waiting for review: soft red glow on the review status ===== */
#details-modal #review-status-group.is-review .luxury-label { color: #B8283D; }
#details-modal #review-status-group.is-review select.login-input {
    border-color: #E58A96; background-color: #FFF8F9; color: #8F1F32; font-weight: 600;
    box-shadow: 0 0 0 4px rgba(224, 52, 75, .13), 0 0 22px rgba(224, 52, 75, .34), 0 1px 3px rgba(20,20,30,.08);
    animation: review-glow 2.6s ease-in-out infinite;
}
@keyframes review-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(224, 52, 75, .12), 0 0 18px rgba(224, 52, 75, .28), 0 1px 3px rgba(20,20,30,.08); }
    50% { box-shadow: 0 0 0 5px rgba(224, 52, 75, .18), 0 0 28px rgba(224, 52, 75, .46), 0 1px 3px rgba(20,20,30,.08); }
}
@media (prefers-reduced-motion: reduce) { #details-modal #review-status-group.is-review select.login-input { animation: none; } }

/* ===== Delivery cards, refined: deeper, muted tones on warm stone, neutral shadows (no neon, no coloured glow) ===== */
#details-modal .dl-outline { --dl: #6A4FB8; --dl-rgb: 106,79,184; }
#details-modal .dl-script  { --dl: #3C64AE; --dl-rgb: 60,100,174; }
#details-modal .dl-rec     { --dl: #A9772A; --dl-rgb: 169,119,42; }
#details-modal .dl-thumb   { --dl: #AC4468; --dl-rgb: 172,68,104; }
#details-modal .dl-edit    { --dl: #3B8663; --dl-rgb: 59,134,99; }
#details-modal .dl-card {
    background: linear-gradient(160deg, color-mix(in srgb, var(--dl) 7%, #F5F4F2) 0%, color-mix(in srgb, var(--dl) 15%, #E8E7E4) 100%);
    border: 1px solid color-mix(in srgb, var(--dl) 30%, #D3D2CE); border-left: 1px solid color-mix(in srgb, var(--dl) 30%, #D3D2CE);
    box-shadow: 0 1px 2px rgba(24, 24, 32, .10), 0 12px 26px -12px rgba(24, 24, 32, .32), inset 0 1px 0 rgba(255, 255, 255, .55);
}
#details-modal .dl-card::before { background: linear-gradient(180deg, var(--dl), color-mix(in srgb, var(--dl) 62%, #1B1B22)); }
#details-modal .dl-title i {
    background: linear-gradient(145deg, color-mix(in srgb, var(--dl) 88%, #fff), color-mix(in srgb, var(--dl) 72%, #14141A));
    box-shadow: 0 5px 10px -5px rgba(20, 20, 28, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
}
#details-modal .dl-sub { color: #6B6A72; }
#details-modal .dl-sub i { color: color-mix(in srgb, var(--dl) 85%, #3A3A44); }
#details-modal .dl-open {
    background: #FBFAF9; color: var(--dl); border: 1px solid color-mix(in srgb, var(--dl) 42%, #CFCEC9);
    box-shadow: 0 1px 2px rgba(24, 24, 32, .10);
}
#details-modal .dl-open:hover { background: #fff; box-shadow: 0 5px 12px -7px rgba(24, 24, 32, .38); }
#details-modal .dl-card .login-input, #details-modal .dl-card .dl-input, #details-modal .dl-card .vl-input {
    background: #FDFCFB; border: 1px solid #D5D4D0;
    box-shadow: 0 1px 2px rgba(24, 24, 32, .08), inset 0 1px 2px rgba(24, 24, 32, .03);
}
#details-modal .dl-card .login-input:focus, #details-modal .dl-card .dl-input:focus, #details-modal .dl-card .vl-input:focus {
    border-color: color-mix(in srgb, var(--dl) 70%, #55555F); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dl) 16%, transparent);
}
#details-modal .dl-nested {
    background: rgba(255, 255, 255, .50); border: 1px solid color-mix(in srgb, var(--dl) 24%, #D3D2CE);
    box-shadow: 0 1px 2px rgba(24, 24, 32, .07), inset 0 1px 0 rgba(255, 255, 255, .6);
}
#details-modal .dl-card .vl-btn {
    background: #FDFCFB; border: 1px solid #D5D4D0; box-shadow: 0 1px 2px rgba(24, 24, 32, .08);
}
#details-modal .dl-card .vl-btn:hover { background: #fff; color: var(--dl); box-shadow: 0 5px 12px -7px rgba(24, 24, 32, .38); }
#details-modal .dl-card .vl-add { background: rgba(255, 255, 255, .45); border: 1px dashed color-mix(in srgb, var(--dl) 50%, #C9C8C3); color: var(--dl); }
#details-modal .dl-card .vl-add:hover { background: rgba(255, 255, 255, .85); border-style: solid; }
#details-modal .dl-title .dl-who { background: rgba(255, 255, 255, .6); border: 1px solid color-mix(in srgb, var(--dl) 38%, #CFCEC9); color: color-mix(in srgb, var(--dl) 88%, #1B1B22); }

/* Video Delivery: Olivier (cut-out) in the icon tile */
#details-modal .dl-title .dl-face {
    position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px; overflow: hidden;
    background: linear-gradient(150deg, color-mix(in srgb, var(--dl) 82%, #fff) 0%, color-mix(in srgb, var(--dl) 70%, #101016) 100%);
    box-shadow: 0 6px 12px -6px rgba(20, 20, 28, .50), 0 0 0 1px rgba(20, 20, 28, .10), inset 0 1px 0 rgba(255, 255, 255, .35);
}
#details-modal .dl-title .dl-face::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 -10px 14px -10px rgba(10, 10, 16, .35); pointer-events: none; }
#details-modal .dl-title .dl-face img { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; user-select: none; -webkit-user-drag: none; }

/* ===== Final Edit (2+ editors): gold ===== */
#details-modal .dl-final { --dl: #B8932F; --dl-rgb: 184,147,47; }
#details-modal .dl-final .dl-title i { background: linear-gradient(145deg, #E1BF68 0%, #B8932F 52%, #8A6A1C 100%); box-shadow: 0 5px 10px -5px rgba(90, 66, 10, .55), inset 0 1px 0 rgba(255, 244, 205, .55); color: #FFF8E1; }
#details-modal .dl-final { background: linear-gradient(160deg, color-mix(in srgb, #B8932F 9%, #F6F3EA) 0%, color-mix(in srgb, #B8932F 20%, #EAE5D6) 100%); border-color: color-mix(in srgb, #B8932F 42%, #D6D0BE); }
#details-modal .dl-final::before { background: linear-gradient(180deg, #D9B455, #8F6D1E); }
#details-modal .dl-final .dl-open { color: #8A6A1C; border-color: color-mix(in srgb, #B8932F 55%, #CFC8B2); }
#details-modal .dl-final .dl-sub i { color: #A07F26; }

/* Final Edit: the box is gold, Olivier's tile stays green like the Video Delivery ones */
#details-modal .dl-final .dl-title .dl-face {
    background: linear-gradient(150deg, color-mix(in srgb, #3B8663 82%, #fff) 0%, color-mix(in srgb, #3B8663 70%, #101016) 100%);
    box-shadow: 0 6px 12px -6px rgba(20, 20, 28, .50), 0 0 0 1px rgba(20, 20, 28, .10), inset 0 1px 0 rgba(255, 255, 255, .35);
}
#details-modal .dl-final .dl-title .dl-face::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 -10px 14px -10px rgba(10, 10, 16, .35); }

/* Script Delivery: the card stays blue, Melvin's tile is violet exactly like the one in Outline */
#details-modal .dl-script .dl-title .dl-face.dl-face-violet {
    background: linear-gradient(150deg, color-mix(in srgb, #6A4FB8 82%, #fff) 0%, color-mix(in srgb, #6A4FB8 70%, #101016) 100%);
}

/* ===== Boards of Connor and Levi only (class board-face on the video modal): his face instead of the icons ===== */
#details-modal .dl-face-connor, #details-modal .mini-face-connor { display: none; }
#details-modal.board-face .dl-title .dl-face-connor { display: block; }
#details-modal.board-face .dl-ico-default { display: none; }
#details-modal.board-face .dl-title .dl-face-connor img { object-position: 50% 0%; }
#details-modal.board-face .mini-face-connor {
    display: inline-flex; flex: 0 0 auto; position: relative; width: 22px; height: 22px; border-radius: 7px; overflow: hidden; vertical-align: middle;
    background: linear-gradient(150deg, color-mix(in srgb, var(--dl) 82%, #fff) 0%, color-mix(in srgb, var(--dl) 70%, #101016) 100%);
    box-shadow: 0 2px 5px -2px rgba(20, 20, 28, .45), 0 0 0 1px rgba(20, 20, 28, .10), inset 0 1px 0 rgba(255, 255, 255, .35);
}
#details-modal.board-face .mini-face-connor img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; display: block; -webkit-user-drag: none; }

/* Connor's and Levi's board only: the Client Input and Client Script Review Loom boxes (with his face) are brown/gold like the Recording box.
   The Outline and Script Delivery cards around them keep their own colours. */
#details-modal.board-face .dl-outline .dl-nested,
#details-modal.board-face .dl-script .dl-nested {
    --dl: #A9772A; --dl-rgb: 169,119,42;
    position: relative; isolation: isolate; border: 1px solid transparent; border-radius: 16px; background: transparent; box-shadow: none;
}
/* The middle is exactly the colour of the Recording card (same recipe); only the outer edges (left and right) soften a little into the colour of the card around it */
#details-modal.board-face .dl-outline .dl-nested::before,
#details-modal.board-face .dl-script .dl-nested::before {
    content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; pointer-events: none;
    background: linear-gradient(160deg, color-mix(in srgb, var(--dl) 7%, #F5F4F2) 0%, color-mix(in srgb, var(--dl) 15%, #E8E7E4) 100%);
    border: 1px solid color-mix(in srgb, var(--dl) 30%, #D3D2CE);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 14px -10px rgba(90, 62, 12, .35);
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .75) 0%, #000 5%, #000 95%, rgba(0, 0, 0, .75) 100%);
            mask-image: linear-gradient(90deg, rgba(0, 0, 0, .75) 0%, #000 5%, #000 95%, rgba(0, 0, 0, .75) 100%);
}
#details-modal.board-face .dl-outline .dl-nested .dl-sub-inline,
#details-modal.board-face .dl-script .dl-nested .dl-sub-inline { color: #5F5A4F; }

/* The face tile in those boxes: same gold as the box, a little rounder */
#details-modal.board-face .dl-outline .dl-nested .mini-face-connor,
#details-modal.board-face .dl-script .dl-nested .mini-face-connor { width: 24px; height: 24px; border-radius: 8px; }

/* Client Input: copy / download the transcripts of all links */
.vl-tools { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(var(--dl-rgb, 120, 110, 90), .18); }
.vl-tool { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; border: 1px solid rgba(var(--dl-rgb, 120, 110, 90), .4); background: #fff; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--dl, #1A1A1D); cursor: pointer; box-shadow: 0 1px 2px rgba(20, 18, 10, .06); }
.vl-tool:hover { background: rgba(var(--dl-rgb, 120, 110, 90), .1); }
.vl-tool[disabled] { opacity: .6; cursor: progress; }
.vl-tool i { font-size: 14px; }
.vl-tool-msg { font-size: 12px; color: var(--text-muted, #81818F); }
.vl-tool-msg.err { color: #B03A3A; }

/* ===== Per-Edit-Card review status & Approve button ===== */
#details-modal .dl-head { flex-wrap: wrap; gap: 8px; }
#details-modal .dl-head-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
#details-modal .dl-edit-status {
    appearance: none; -webkit-appearance: none;
    padding: 5px 24px 5px 10px; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--dl) 38%, #CFCEC9);
    background-color: #FBFAF9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 256 256'%3E%3Cpath fill='%234A5550' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center;
    font: inherit; font-size: 11.5px; font-weight: 700; color: #3A4740;
    cursor: pointer; box-shadow: 0 1px 2px rgba(24, 24, 32, .08);
    transition: border-color .15s, background-color .15s, box-shadow .15s, color .15s;
}
#details-modal .dl-edit-status:hover:not(:disabled) { background-color: #fff; }
#details-modal .dl-edit-status:disabled { opacity: .75; cursor: default; }
#details-modal .dl-edit-status.is-review {
    border-color: #E58A96; background-color: #FFF8F9; color: #8F1F32;
    box-shadow: 0 0 0 3px rgba(224, 52, 75, .13), 0 1px 2px rgba(20, 20, 30, .08);
}
#details-modal .dl-edit-status.is-revisions {
    border-color: #E2A96B; background-color: #FFF9F2; color: #8B4E12;
}
#details-modal .dl-edit-status.is-approved {
    border-color: #63B387; background-color: #EFFAF4; color: #19613B;
}
#details-modal .dl-approve-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: 999px;
    border: 1px solid #2A7B52;
    background: linear-gradient(160deg, #3B9567 0%, #2B7A52 100%);
    color: #fff; font: inherit; font-size: 11.5px; font-weight: 700;
    cursor: pointer; box-shadow: 0 2px 5px -2px rgba(25, 90, 56, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
    transition: transform .12s, box-shadow .15s, filter .15s;
}
#details-modal .dl-approve-btn:hover { filter: brightness(1.05); box-shadow: 0 4px 10px -4px rgba(25, 90, 56, .55), inset 0 1px 0 rgba(255, 255, 255, .32); }
#details-modal .dl-approve-btn:active { transform: translateY(1px); }
#details-modal .dl-approve-btn.is-approved {
    background: #EFFAF4; color: #19613B; border-color: #63B387;
    box-shadow: 0 1px 2px rgba(24, 24, 32, .08);
}
#details-modal .dl-approve-btn.is-approved:hover { background: #E3F6EC; filter: none; }
#details-modal .dl-card.is-card-review,
#details-modal .dl-card.dl-edit.is-card-review {
    border-color: #E58A96;
    box-shadow: 0 0 0 3px rgba(224, 52, 75, .12), 0 12px 26px -12px rgba(24, 24, 32, .32), inset 0 1px 0 rgba(255, 255, 255, .55);
}
#details-modal .dl-card.is-card-approved,
#details-modal .dl-card.dl-edit.is-card-approved {
    border-color: color-mix(in srgb, #2B8A57 55%, #D3D2CE);
}

/* Topic Notes grows with its text */
#details-modal #detail-angle { min-height: 84px; overflow: hidden; resize: none; }

/* Status dropdown on every delivery box */
#details-modal .dl-card-status { flex-shrink: 0; }
#details-modal .dl-card.is-card-revisions { border-color: color-mix(in srgb, #D08A3E 60%, #D3D2CE); }
#details-modal .dl-nested .dl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#details-modal .dl-nested .dl-card-status { padding: 4px 22px 4px 9px; font-size: 11px; background-position: right 8px center; }
#details-modal .dl-nested.is-card-review {
    border-style: solid; border-color: #E58A96; background: #FFF8F9;
    box-shadow: 0 0 0 3px rgba(224, 52, 75, .10);
}
#details-modal .dl-nested.is-card-revisions { border-style: solid; border-color: #E2A96B; background: #FFF9F2; }
#details-modal .dl-nested.is-card-approved { border-style: solid; border-color: #8CC7A5; background: #F3FBF6; }
#details-modal .dl-nested .dl-head .dl-sub-inline { flex: 1 1 220px; min-width: 0; flex-wrap: wrap; }

/* Topic Notes: formatted box (Cmd+B bold, "- " bullets) */
#details-modal .rt-notes {
    min-height: 84px; padding: 14px 18px; border: 1px solid #D9D9DD; border-radius: var(--radius-md, 12px);
    background: #FFFFFF; color: #19191C; font-family: inherit; font-size: 15px; line-height: 1.5;
    outline: none; cursor: text; white-space: pre-wrap; overflow-wrap: anywhere;
    box-shadow: 0 1px 2px rgba(24, 24, 32, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
#details-modal .rt-notes:focus { border-color: #1A1A1D; box-shadow: 0 0 0 3px rgba(26, 26, 29, .14); }
#details-modal .rt-notes:empty::before { content: attr(data-placeholder); color: #9C9CA7; pointer-events: none; }
#details-modal .rt-notes b, #details-modal .rt-notes strong { font-weight: 700; color: #111114; }
#details-modal .rt-notes ul { margin: 2px 0; padding-left: 22px; list-style: disc; }
#details-modal .rt-notes li { margin: 2px 0; padding-left: 2px; }
#details-modal .rt-notes li::marker { color: #8E8A82; }
#details-modal .rt-notes.is-readonly { cursor: default; background: #FAFAFA; }
#details-modal #detail-angle[hidden] { display: none !important; }

/* Box whose stage has not started yet: empty status */
#details-modal .dl-edit-status.is-empty {
    min-width: 92px; color: transparent; border-style: dashed;
    border-color: color-mix(in srgb, var(--dl, #8E8A82) 30%, #D9D8D4); background-color: rgba(255, 255, 255, .45); box-shadow: none;
}
#details-modal .dl-edit-status.is-empty option { color: #19191C; }
