/* ==========================================================================
   17-licenses.css — SOFTWARE LICENCES

   The same bones as 📌 Speaker's Record ▸ Appearances, which is what was
   asked for: a rounded card, a sticky heading row in small cyan capitals,
   gold for the column you scan by, thin separators, the whole row clickable,
   and the detail opening underneath rather than in a second dialog.

   The one place it departs from the Maintenance Schedule is the payment
   block, which is boxed off inside the detail. That is deliberate: it is the
   part of the form that is about money rather than about software, and a
   box around it is how somebody knows to read the line underneath about
   four digits before they start typing.
   ========================================================================== */

.lic-note { font-size: 11px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.lic-note strong { color: var(--white); }
.lic-note em { color: var(--cyan); font-style: normal; }

.lic-locked {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--gold); line-height: 1.5;
  background: rgba(201, 168, 76, .12); border: 1.5px solid rgba(201, 168, 76, .35);
  border-radius: 6px; padding: 9px 12px; margin-bottom: 12px;
}
.lic-locked strong { color: var(--white); }

/* ---- the three rooms ---------------------------------------------------- */
.lic-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.lic-tab {
  background: var(--navy2); border: 1px solid var(--c-border); color: var(--muted);
  border-radius: 5px; padding: 6px 12px; font-size: 11px; cursor: pointer;
  min-height: 32px; letter-spacing: .3px;
}
.lic-tab:hover { color: var(--white); border-color: var(--cyan); }
.lic-tab.is-on { background: rgba(0, 180, 216, .15); border-color: var(--cyan); color: var(--cyan); font-weight: bold; }

/* ---- the controls ------------------------------------------------------- */
.lic-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.lic-search, .lic-select {
  background: var(--navy2); border: 1px solid var(--c-border); color: var(--white);
  border-radius: 5px; padding: 7px 10px; font-size: 11px; min-height: 34px;
}
.lic-search { flex: 1 1 260px; min-width: 0; }
.lic-count { font-size: 10px; color: var(--muted); white-space: nowrap; }
.lic-sm { padding: 6px 12px; font-size: 10.5px; min-height: 32px; }
.lic-danger { border-color: rgba(239, 68, 68, .55); color: #fca5a5; }
.lic-danger:hover { border-color: var(--red); color: #fff; }

/* What a year of software costs. A figure, not a decoration — so it gets the
   gold the rest of the app uses for the number you came to read. */
.lic-year {
  font-size: 11px; color: var(--muted); line-height: 1.5;
  background: rgba(201, 168, 76, .10); border: 1px solid rgba(201, 168, 76, .28);
  border-radius: 6px; padding: 8px 12px; margin-bottom: 12px;
}
.lic-year strong { color: var(--gold); font-size: 13px; }

.lic-add {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--navy2); border: 1px solid var(--c-border);
  border-radius: 6px; padding: 8px 12px; margin-bottom: 12px;
}
.lic-add-q { font-size: 10.5px; color: var(--muted); }

/* ---- the table ---------------------------------------------------------- */
.lic-card-wrap {
  background: var(--navy); border: 1px solid var(--c-border);
  border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.lic-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lic-table { width: 100%; text-align: left; border-collapse: collapse; font-size: 11px; }

.lic-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--navy2); color: var(--cyan);
  font-size: 9px; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  padding: 7px 8px; cursor: pointer; user-select: none;
  transition: color .15s;
}
.lic-table thead th:hover { color: var(--white); }
.lic-sort-mark { font-size: .85em; opacity: .9; }

.lic-tr { cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, .05); transition: background .15s; }
.lic-tr:hover { background: rgba(0, 180, 216, .07); }
.lic-tr.is-open { background: rgba(0, 180, 216, .15); }
.lic-tr td { padding: 6px 8px; vertical-align: top; }

.lic-num    { color: var(--muted); font-family: monospace; }
.lic-name   { color: var(--white); font-weight: 600; display: block; }
.lic-vendor { color: var(--cyan); font-size: 9.5px; display: block; margin-top: 1px; }
.lic-date   { color: var(--gold); font-weight: bold; white-space: nowrap; display: block; }
.lic-cyc    { font-size: 9px; color: var(--muted); display: block; margin-top: 1px; }
.lic-cost   { color: var(--white); white-space: nowrap; }
.lic-seats  { color: var(--muted); }
.lic-mach   { color: var(--muted); }
.lic-dim    { color: var(--muted); font-style: italic; }

/* A date that has gone by, and one that is nearly here, say so in the cell
   as well as in the pill — because the date column is the one being scanned
   and a colour there is read without having to reach the far side. */
.lic-date.is-overdue { color: #fca5a5; }
.lic-date.is-soon    { color: #fcd34d; }
/* Bought outright: the date is kept, but it is not a renewal, so it does not
   wear renewal gold under a column headed "Renews". */
.lic-date.is-perp    { color: var(--muted); font-weight: normal; }

.lic-card  { font-family: monospace; color: var(--white); letter-spacing: .5px; }
.lic-flag  { font-size: 9px; white-space: nowrap; }
.lic-flag-ok   { color: #86efac; }
.lic-flag-warn { color: #fcd34d; font-weight: bold; }

.lic-site { color: var(--cyan); text-decoration: none; font-size: 10.5px; }
.lic-site:hover { text-decoration: underline; }

.lic-status { line-height: 1.9; }
.lic-pill {
  display: inline-block; font-size: 9px; font-weight: bold;
  padding: 2px 7px; border-radius: 3px; white-space: nowrap;
}
.lic-pill-cyan  { background: rgba(0, 180, 216, .18); color: var(--cyan); }
.lic-pill-green { background: rgba(34, 197, 94, .18); color: #86efac; }
.lic-pill-amber { background: rgba(245, 158, 11, .20); color: #fcd34d; }
.lic-pill-grey  { background: rgba(148, 163, 184, .18); color: var(--muted); }
.lic-pill-red   { background: rgba(239, 68, 68, .18); color: #fca5a5; }

/* ---- the row opened out -------------------------------------------------- */
.lic-detail-row td { background: rgba(0, 0, 0, .25); padding: 0 !important; }
.lic-detail { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.lic-whose { font-size: 10.5px; color: var(--muted); }
.lic-whose strong { color: var(--white); }

.lic-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lic-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lic-f-wide { grid-column: span 2; }
.lic-f-narrow { max-width: 130px; }
.lic-f span { font-size: 9.5px; color: var(--cyan); text-transform: uppercase; letter-spacing: .5px; font-weight: bold; }
.lic-f input, .lic-f textarea, .lic-f select {
  background: var(--navy2); border: 1px solid var(--c-border); color: var(--white);
  border-radius: 4px; padding: 7px 9px; font-size: 11px; font-family: inherit; min-height: 32px;
}
.lic-f textarea { resize: vertical; }
.lic-ro { font-size: 11px; color: var(--muted); }

/* ---- the payment block --------------------------------------------------- */
.lic-pay {
  grid-column: 1 / -1;
  background: rgba(201, 168, 76, .08);
  border: 1px solid rgba(201, 168, 76, .30);
  border-radius: 6px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.lic-pay-head {
  font-size: 9.5px; color: var(--gold); text-transform: uppercase;
  letter-spacing: .6px; font-weight: bold;
}
.lic-pay-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lic-pay-note { font-size: 9.5px; color: var(--muted); line-height: 1.5; }

/* Who pays, and who is taking it on. Two boxes wide enough for a name, and a
   line underneath when the second one is filled in and the first has not
   caught up — which is the whole state this pair of fields exists to record. */
.lic-pay-who { align-items: flex-start; }
.lic-pay-who .lic-f { flex: 1 1 200px; max-width: 280px; }
.lic-handover {
  flex: 1 1 100%; font-size: 10px; color: var(--cyan); line-height: 1.5;
  border-left: 2px solid var(--cyan); padding-left: 9px; margin-top: 2px;
}
.lic-handover strong { color: var(--white); }

.lic-l4 { font-family: monospace; letter-spacing: 2px; text-align: center; }

.lic-check {
  display: flex; align-items: center; gap: 7px;
  font-size: 10.5px; color: var(--white); line-height: 1.4;
  cursor: pointer; min-height: 32px; max-width: 280px;
}
.lic-check input { width: 15px; height: 15px; flex: 0 0 auto; cursor: pointer; accent-color: var(--cyan); }
.lic-check strong { color: var(--gold); }

.lic-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lic-act-site { margin-right: auto; }

.lic-empty {
  padding: 28px 16px; color: var(--muted); font-size: 12px; text-align: center;
  background: var(--navy); border: 1px dashed var(--c-border); border-radius: 6px;
}
.lic-empty strong { color: var(--white); }

/* ---- the Dashboard card -------------------------------------------------- */
/* It rides the feed-item shape the Maintenance Schedule uses, so the two
   blocks under the speaker cards read as one pair rather than two designs. */
.lic-feed-item { border-left: 3px solid var(--gold); cursor: pointer; }
.lic-feed-item.is-overdue { border-left-color: var(--red); }
.lic-feed-item.is-soon    { border-left-color: #f59e0b; }
.lic-feed-when { font-size: 12px; font-weight: bold; color: var(--gold); }
.lic-feed-when.is-overdue { color: #fca5a5; }
.lic-feed-when.is-soon    { color: #fcd34d; }
.lic-feed-name { font-size: 12px; color: var(--white); font-weight: 600; margin-top: 4px; }
.lic-feed-sub  { font-size: 10px; color: var(--muted); margin-top: 2px; }
.lic-feed-card { font-size: 10px; color: #fcd34d; font-weight: bold; margin-top: 4px; }

@media (max-width: 860px) {
  .lic-fields { grid-template-columns: 1fr; }
  .lic-f-wide { grid-column: span 1; }
  .lic-f-narrow { max-width: none; }
  .lic-check { max-width: none; }
}

@media print {
  .lic-table thead th { position: static; cursor: default; }
  .lic-sort-mark, .lic-acts, .lic-tabs, .lic-controls, .lic-add { display: none !important; }
}
