/* INGEST by Tango - additions to the shared STEP / QUOTE styles in app.css */
.user-pick { display: flex; align-items: center; gap: .35rem; color: var(--step-dark-blue-1); }
.user-pick .form-select { border-radius: 2rem; min-width: 160px; font-weight: 500; }
.badge-ai { background: var(--step-light-blue-1); color: var(--step-dark-blue-1); }
.badge-quote { background: var(--step-light-orange-1); color: var(--step-orange-1); }
.badge-ok { background: var(--step-light-green-1); color: #0a7a10; }
.badge-err { background: var(--step-light-red-1); color: #b33a10; }
.list-row .meta { font-size: .85em; color: #5c707b; }
.list-row .col-b .count { font-size: 1.6em; font-weight: 600; line-height: 1; color: var(--step-dark-blue-2); }
.list-row .col-b .count small { font-size: .45em; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: var(--step-dark-blue-1); }

.type-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.type-card { border: 1px solid var(--step-light-grey-3); background: var(--step-light-grey-1); border-radius: 1rem; padding: .8rem .9rem; cursor: pointer; }
.type-card:hover { background: var(--step-light-grey-2); }
.type-card.active { border-color: var(--step-orange-1); background: var(--step-light-orange-1); }
.type-card .bi { font-size: 1.3rem; color: var(--step-orange-1); }
.type-card .n { font-weight: 600; }
.type-card .d { font-size: .82em; color: #5c707b; }
.btn-check:checked + .btn-outline-secondary { background: var(--step-dark-blue-1); color: #fff; border-color: var(--step-dark-blue-1); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .15rem .9rem; font-size: .93em; }
.kv dt { font-weight: 500; color: var(--step-dark-blue-1); font-size: .78em; text-transform: uppercase; letter-spacing: .03em; padding-top: .15rem; }
.kv dd { margin: 0; }
.big-num { font-size: 1.9em; font-weight: 700; line-height: 1; color: var(--step-dark-blue-2); }
.big-num small { font-size: .4em; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--step-dark-blue-1); display: block; margin-top: .2rem; }

.drop-zone { border: 2px dashed var(--step-grey-1); border-radius: 1.2rem; padding: 1.2rem; text-align: center; color: #5c707b; cursor: pointer; background: #fff; }
.drop-zone:hover, .drop-zone.over { border-color: var(--step-orange-1); background: var(--step-light-orange-1); color: var(--step-dark-blue-2); }
.drop-zone .bi { font-size: 1.8rem; color: var(--step-orange-1); }

.input-row { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .9rem; background: var(--step-light-grey-3); border-radius: .75rem; margin-bottom: 6px; box-shadow: 0 1px 0 0 rgba(0,0,0,.11); }
.input-row.excluded { opacity: .55; }
.input-row .ic { font-size: 1.4rem; color: var(--step-dark-blue-1); }
.input-row .nm { font-weight: 600; }
.input-row .sub { font-size: .82em; color: #5c707b; }
.input-row .preview { white-space: pre-wrap; font-size: .85em; color: #3d5562; max-height: 9em; overflow: auto; background: #fff; border-radius: .5rem; padding: .4rem .6rem; margin-top: .35rem; }

.sec-row { display: flex; flex-wrap: wrap; margin-bottom: 6px; border-radius: .75rem; }
.sec-row > .col-a { flex: 1 1 520px; min-width: 0; padding: 14px 18px; background: var(--step-light-grey-3); box-shadow: 0 1px 0 0 rgba(0,0,0,.11); border-radius: .75rem 0 0 .75rem; }
.sec-row > .col-b { flex: 0 1 300px; padding: 12px 16px; background: #fafafa; box-shadow: 0 1px 0 0 rgba(0,0,0,.05); border-radius: 0 .75rem .75rem 0; font-size: .88em; color: #5c707b; }
@media (max-width: 1199px) {
	.sec-row > .col-a { border-radius: .75rem .75rem 0 0; flex-basis: 100%; }
	.sec-row > .col-b { border-radius: 0 0 .75rem .75rem; flex-basis: 100%; }
}
.sec-row.act-generate > .col-a, .sec-row.act-tailor > .col-a { border-left: 4px solid var(--step-orange-1); }
.sec-row.act-keep > .col-a { border-left: 4px solid var(--step-dark-blue-1); }
.sec-row .act-select { width: auto; padding: .15rem 1.8rem .15rem .55rem; font-size: .78em; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; border-radius: 2rem; }
.sec-row textarea.md { font-family: Consolas, "Cascadia Mono", monospace; font-size: .86em; line-height: 1.45; }
.sec-row .tpl-text { white-space: pre-wrap; font-size: .85em; color: #4b606b; background: #fff; border-radius: .6rem; padding: .5rem .7rem; max-height: 14em; overflow: auto; margin-top: .4rem; }
.item-list { margin-top: .55rem; display: flex; flex-direction: column; gap: .3rem; }
.item { background: #fff; border-radius: .6rem; padding: .35rem .6rem; border: 1px solid var(--step-light-grey-3); }
.item.off { background: transparent; opacity: .6; }
.item .lab { font-weight: 500; }
.item .lines { margin: .3rem 0 .1rem 1.6rem; columns: 2 320px; font-size: .86em; }
.item .lines label { display: block; break-inside: avoid; }
.item .lines label.off { color: #9aa7ae; text-decoration: line-through; }
.item textarea { font-size: .86em; margin-top: .3rem; }
.chk-panel .chk { display: flex; gap: .5rem; padding: .3rem 0; font-size: .92em; border-bottom: 1px dashed var(--step-light-grey-3); }
.chk-panel .chk:last-child { border-bottom: 0; }
.chk .bi-x-octagon-fill { color: var(--step-red); }
.chk .bi-exclamation-triangle-fill { color: var(--step-orange-1); }
.chk .bi-question-circle-fill { color: var(--step-dark-blue-1); }
.chk .ctx { display: block; font-size: .85em; color: #7b8a93; font-style: italic; }
.save-bar { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); width: min(900px, calc(100% - 2rem)); z-index: 1030; background: var(--step-dark-blue-2); color: #fff; border-radius: 2rem; padding: .5rem .6rem .5rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; box-shadow: 0 6px 20px rgba(0,0,0,.18); margin-top: 1rem; }
.save-bar input { border-radius: 2rem; max-width: 340px; }
.running { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; border-radius: 1.2rem; background: var(--step-light-blue-1); color: var(--step-dark-blue-2); margin-bottom: 1rem; }
.err-box { padding: .8rem 1.1rem; border-radius: 1rem; background: var(--step-light-red-1); color: #8a2a08; margin-bottom: 1rem; }
.info-box { padding: .8rem 1.1rem; border-radius: 1rem; background: var(--step-light-orange-1); color: var(--step-dark-blue-2); margin-bottom: 1rem; }

.rule-card { border-radius: 1.2rem; background: var(--step-light-grey-1); border: 1px solid var(--step-light-grey-3); padding: 14px 18px; margin-bottom: .7rem; }
.rule-card.off { opacity: .6; }
.rule-card .title-input { border: 0; background: transparent; font-weight: 600; font-size: 1.05em; color: var(--step-dark-blue-2); width: 100%; outline: none; border-bottom: 1px dashed transparent; padding: 0; }
.rule-card .title-input:hover { border-bottom-color: var(--step-grey-1); }
.rule-card .title-input:focus { border-bottom-color: var(--step-dark-blue-1); }
.rule-card textarea { font-size: .93em; }
.rule-card .hist { font-size: .85em; border-left: 3px solid var(--step-grey-1); padding-left: .7rem; margin-top: .5rem; color: #5c707b; }
.cat-guardrail { color: var(--step-red) !important; }
.cat-content { color: var(--step-orange-1) !important; }
.cat-style { color: var(--step-dark-blue-1) !important; }
.cat-check { color: #0a7a10 !important; }
.text-view { white-space: pre-wrap; font-size: .82em; background: var(--step-light-grey-2); border-radius: .75rem; padding: 1rem; max-height: 70vh; }
.mini-table { font-size: .9em; --bs-table-bg: transparent; }
.mini-table th { font-size: .72em; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--step-dark-blue-1); }
.mini-table td.num, .mini-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Management viewing as another user */
.imp-banner { background: #fff4e5; border: 1px solid #f5a623; border-radius: 999px; padding: .4rem 1rem; font-size: .9rem; }

/* Active milestones in the ingestions sidebar */
.ms-list { max-height: 420px; overflow-y: auto; }
.ms-item { border: 1px solid #e3e7ea; border-radius: 10px; padding: .45rem .7rem; margin-bottom: .4rem; background: #fff; }
.ms-item:hover { border-color: #f5a623; }
.ms-item.active { border-color: #33647e; background: #f4f7f8; }
.ms-item > a:first-child { display: block; color: inherit; text-decoration: none; }

/* Insurance certificate with a new document whose expiry date still needs checking */
.ins-row-check > td { background: #fff8e6 !important; }
.ins-row-check [data-ins="expiry"] { border-color: #f5a623; box-shadow: 0 0 0 .15rem rgba(245, 166, 35, .35); }
.ins-check { color: #9a6200; }
[data-ins="insurer"], [data-ins="cover"] { min-width: 150px; }
[data-ins="type"] { min-width: 190px; }

/* Work with Tango (CVs) */
.cv-work-row > td { background: #f7f9fa; }

/* Insurance certificates: every cell starts at the top, so the boxes and buttons line up across each row whatever notes
   (file name, "Expires soon") sit under them. */
.ins-table td { vertical-align: top; padding-top: .5rem; padding-bottom: .5rem; }
.ins-table td:last-child { white-space: nowrap; }
.ins-table td .btn-icon, .ins-table td .btn { vertical-align: top; }
/* Action buttons the same height as the boxes (31px), centred on them. */
.ins-table td:last-child .btn-icon, .ins-table td:last-child .btn { height: 31px; display: inline-flex; align-items: center; justify-content: center; margin-top: 0; padding-top: 0; padding-bottom: 0; }
