/* Additions on top of styles.css for components not present in the captured
   Jobs-page snapshot (list/tabs/forms/kpis) — reuses the same CSS variables
   defined in styles.css's dark theme so it blends with the original look. */

body[hidden] { display: none; }
.tab[hidden] { display: none; }
.hint { font-size: .8rem; color: var(--slate); margin: -.4rem 0 .6rem; min-height: 1em; }

.toolbar { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.search-input {
  width: 100%; box-sizing: border-box; padding: .7rem .9rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--field, var(--card)); color: var(--ink);
  font: inherit;
}
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 900; cursor: pointer;
}
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.job-list { display: flex; flex-direction: column; gap: .6rem; }
.job-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: .9rem 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .3rem;
}
.job-card:hover { border-color: var(--brand); }
.job-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.job-card-service { font-weight: 800; color: var(--ink); }
.job-card-address { color: var(--slate); font-size: .85rem; }
.job-card-meta { display: flex; gap: .4rem; flex-wrap: wrap; font-size: .74rem; }
.badge {
  display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 999px;
  font-weight: 700; font-size: .72rem; background: #2c333f; color: var(--slate);
}
.badge-received { background: rgba(224,169,77,.18); color: #e0a94d; }
.badge-assigned { background: rgba(52,211,153,.15); color: var(--brand); }
.badge-done { background: rgba(18,185,129,.18); color: #12b981; }
.badge-cancelled { background: rgba(229,72,77,.15); color: #ff8b80; }
.badge-open { background: rgba(106,168,255,.18); color: #6aa8ff; }
.badge-quote { background: rgba(154,103,0,.2); color: #e2b23c; }
.badge-emergency { background: rgba(229,72,77,.18); color: #ff8b80; }

.form-card { max-width: 640px; }
.form-card fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem 1rem; margin: 0 0 1rem; }
.form-card legend { padding: 0 .4rem; font-weight: 800; font-size: .85rem; color: var(--slate); }
.form-card label { display: block; margin-bottom: .7rem; font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; box-sizing: border-box; margin-top: .3rem; padding: .6rem .7rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--field, var(--card)); color: var(--ink); font: inherit;
}
.row-check { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.row-check input { width: auto; margin: 0; }
.form-err { min-height: 1.1em; color: var(--err); font-size: .85rem; }

.field-blue {
  border: 2px solid #1f6feb !important;
  background: rgba(31,111,235,.10) !important;
  color: var(--ink) !important;
  font-size: 1.2rem !important;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(31,111,235,.16);
}
.field-blue:focus { outline: none; border-color: #1f6feb !important; box-shadow: 0 0 0 4px rgba(31,111,235,.24); }

.simple-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.simple-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; }
.simple-row .del { border: 0; background: transparent; color: var(--err); cursor: pointer; font-size: 1.1rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.inline-form input, .inline-form select { flex: 1 1 120px; padding: .5rem .6rem; border-radius: 8px; border: 1px solid var(--line); background: var(--field, var(--card)); color: var(--ink); font: inherit; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; }
.kpi-grid .card.kpi .num { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.kpi-grid .card.kpi .lbl { font-size: .78rem; color: var(--slate); }

.photo-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.photo-row { display: flex; gap: .4rem; flex-wrap: wrap; margin: .4rem 0; }

.scan-modal { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; }
.scan-modal video { flex: 1; width: 100%; object-fit: cover; background: #000; }
.scan-overlay { padding: 1rem; color: #fff; text-align: center; }
.scan-actions { display: flex; gap: .6rem; justify-content: center; margin-top: .6rem; }

.notif-note { min-height: 1.1em; font-size: .84rem; color: var(--slate); }
.notif-note.ok { color: #47e0a6; }

table.invoice-table { width: 100%; border-collapse: collapse; margin: .6rem 0; }
table.invoice-table th, table.invoice-table td { text-align: left; padding: .4rem .3rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
