/* ==========================================================================
   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(6, 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(6, 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; }
