/* ============================================================
   Tender Monitor additions on top of the portal "Glass" theme (style.css)
   ============================================================ */

/* Closing-date ledger on the dashboard */
.ledger { display: grid; gap: 4px; margin-top: 12px; }
.ledger-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 10px; border-radius: var(--r-md); text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row:hover { background: var(--hover); color: var(--ink); }
.ledger-row .date { text-align: center; line-height: 1; padding: 8px 0; border-radius: 12px; background: var(--tint); }
.ledger-row .date b { display: block; font-size: 24px; font-weight: 800; color: var(--accent-text); letter-spacing: -.02em; }
.ledger-row .date small { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.ledger-row .what { min-width: 0; display: flex; flex-direction: column; }
.ledger-row .what strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Checklist */
.ck { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ck:last-of-type { border-bottom: 0; }
.ck form.ck-form { margin: 2px 0 0; }
.ck input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--purple); cursor: pointer; margin: 0; }
.ck label { flex: 1; margin: 0; font-weight: 600; font-size: 14px; cursor: pointer; }
.ck.done label { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line); }
.ck .icon-btn { width: 34px; height: 34px; font-size: 13px; color: var(--ink-3); }

/* AI score ring */
.ai-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px; border-radius: 16px; background: var(--tint); }
.ring { --c: var(--ok-fg); width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(closest-side, var(--glass-strong) 78%, transparent 80%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.ring.warn { --c: var(--warn-fg); } .ring.bad { --c: var(--bad-fg); }
.ring b { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.ring span { font-size: 11px; color: var(--ink-3); }
.ai-facts { margin-top: 16px; }
.ai-list { margin: 0; padding-left: 18px; font-size: 14px; }
.ai-list li { margin-bottom: 6px; }

/* Upload drop zone */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 32px 16px; margin: 0; border: 2px dashed var(--field-edge); border-radius: 18px; background: var(--glass-soft); cursor: pointer; font-weight: 500; transition: border-color .15s ease, background .15s ease; }
.drop:hover, .drop.on { border-color: var(--purple); background: var(--tint); }
.drop strong { color: var(--accent-text); }
.drop input[type=file] { margin-top: 10px; max-width: 420px; }
.drop-icon svg { width: 34px; height: 34px; color: var(--magenta); }
.filelist { list-style: none; padding: 0; margin: 10px 0 0; font-size: 14px; }
.filelist li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: var(--glass-soft); overflow-wrap: anywhere; }

/* Licence bars and search highlight */
.lic-row { grid-template-columns: minmax(0, 16em) 1fr 90px; }
.bar > span.good { background: linear-gradient(90deg, #2ea074, #5cc79b); box-shadow: none; }
.bar > span.warn { background: linear-gradient(90deg, #e2961e, #f0b552); box-shadow: none; }
.bar > span.bad { background: var(--gradient); }
mark { background: rgba(226,150,30,.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.badge.bad::before, .badge.good::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

@media (max-width: 640px) {
    .ai-head { grid-template-columns: 1fr; justify-items: start; }
    .lic-row { grid-template-columns: 1fr 70px; }
    .lic-row .bar { grid-column: 1 / -1; grid-row: 2; }
    .ledger-row { grid-template-columns: 48px minmax(0, 1fr); }
    .ledger-row .badge { grid-column: 2; justify-self: start; }
}
