/* Chemcrux QC Digital – screen styles (print documents use print.css) */
:root { --cx-green: #198754; --cx-red: #dc3545; }
body { background: #f4f6f8; font-size: 0.95rem; }
.navbar-brand .bi { color: #5dd6a4; }

/* Touch-friendly controls for factory tablets */
@media (pointer: coarse), (max-width: 1100px) {
  .btn { padding-top: .55rem; padding-bottom: .55rem; }
  .form-control, .form-select { min-height: 2.8rem; }
  .table > :not(caption) > * > * { padding: .6rem .6rem; }
}

.page-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; margin: 0; }

.card { border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.card-header { background: #fff; font-weight: 600; }

.stat-tile { text-decoration: none; color: inherit; display: block; }
.stat-tile .card { transition: transform .1s; }
.stat-tile:hover .card { transform: translateY(-2px); }
.stat-tile .num { font-size: 2rem; font-weight: 700; line-height: 1; }

.kv dt { font-weight: 500; color: #6c757d; }
.kv dd { margin-bottom: .45rem; }

/* Compliance flags (analytical testing screen) */
.result-row.is-complied td { background: #e9f7ef; }
.result-row.is-noncomplied td { background: #fdecea; }
.flag { display: inline-block; min-width: 7.5rem; text-align: center; padding: .3rem .6rem; border-radius: .4rem; font-weight: 700; font-size: .85rem; color: #fff; background: #adb5bd; }
.flag.ok { background: var(--cx-green); }
.flag.bad { background: var(--cx-red); }
.flag.err { background: #fd7e14; }
.result-input { font-size: 1.15rem; font-weight: 600; max-width: 18rem; }

/* Split screen: results left, STP viewer right */
.split { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.split.stp-open { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.stp-frame { width: 100%; height: 78vh; border: 1px solid #ced4da; background: #fff; }
@media (max-width: 1100px) { .split.stp-open { grid-template-columns: 1fr; } }

.aging-OVER_48 td { background: #fdecea; }
.aging-OVER_24 td { background: #fff6e0; }

table.dataTable { width: 100% !important; }
.dt-buttons { margin-bottom: .5rem; }

.esign-box { border: 1px dashed #6c757d; border-radius: .5rem; padding: .75rem 1rem; background: #fffdf5; }
.sig-line { border-bottom: 1px solid #000; height: 2rem; }
.param-table input, .param-table select { min-width: 5rem; }
.required::after { content: ' *'; color: var(--cx-red); }
.no-print { }
@media print { .no-print { display: none !important; } body { background: #fff; } }
