html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-table-scroll {
  max-height: 330px;
  overflow-y: auto;
}

.dashboard-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.analysis-count-badge {
  color: #000 !important;
  background-color: #e9ecef !important;
  border: 1px solid #adb5bd;
}

.badge.text-bg-success,
.badge.text-bg-secondary {
    color: #000 !important;
}

.customer-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.customer-table {
    min-width: 820px;
}

.customer-table th,
.customer-table td {
    white-space: nowrap;
}

.customer-table td:nth-child(2),
.customer-table td:nth-child(5) {
    white-space: normal;
}

.personnel-actions {
    min-width: 145px;
    white-space: nowrap;
}

.personnel-actions .btn,
.personnel-actions form {
    vertical-align: middle;
}

.personnel-actions .btn + form {
    margin-left: 0.25rem;
}

@media (max-width: 575.98px) {
    .customer-create-button {
        width: auto;
        align-self: flex-start;
    }

    .customer-filter-actions .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .report-detail-toolbar {
        align-items: stretch !important;
        flex-direction: column;
        gap: 0.75rem;
    }

    .report-detail-actions {
        display: grid !important;
        gap: 0.5rem !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .report-detail-actions .btn,
    .report-detail-actions form {
        width: 100%;
    }

    .report-detail-actions .btn {
        min-height: 38px;
        white-space: normal;
    }
}

/* ELISA plate tablosunda 12 kolon oldugu icin hucrelerin sabit ve okunabilir kalmasini saglar. */
.elisa-plate-table th,
.elisa-plate-table td {
    min-width: 76px;
    padding: 0.25rem;
}

/* Laboratuvar formlarinin altinda standart dokuman kodunu gosterir. */
.form-code-footer {
    color: #000;
    font-size: 0.85rem;
    font-weight: 600;
}

.report-detail-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-preview-scroll {
    overflow-x: auto;
    padding-bottom: 10px;
}

/* ELISA deney kayit defterindeki imza ve yetkinlik takip bolumunu tablo gibi gosterir. */
.elisa-signature-block {
    color: #000;
}

.elisa-signature-block .signature-cell {
    border: 1px solid #000;
}

.elisa-signature-block .signature-title,
.elisa-signature-block .competency-title {
    border-bottom: 1px solid #000;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem;
    text-align: center;
}

.elisa-signature-block .competency-title {
    border: 1px solid #000;
    border-bottom: 0;
}

.elisa-signature-block .signature-space {
    min-height: 54px;
}

.elisa-signature-block .signature-space-lg {
    min-height: 76px;
}

.elisa-signature-block .signature-value {
    align-items: center;
    display: flex;
    font-size: 0.95rem;
    font-weight: 600;
    justify-content: center;
    padding: 0.5rem;
    text-align: center;
}

.turkak-report {
    background: #f2f3f5;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10.5px;
    min-width: 210mm;
    padding: 16px 0;
}

.turkak-report,
.turkak-report * {
    box-sizing: border-box;
}

.turkak-page {
    background: #fff;
    border: 1px solid #d4d4d4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    margin: 0 auto 16px;
    min-height: 290mm;
    padding: 11mm;
    position: relative;
    width: 210mm;
}

.turkak-header,
.turkak-second-header {
    align-items: flex-start;
    border: 1px solid #000;
    display: grid;
    gap: 8px;
    grid-template-columns: 42mm 1fr 32mm;
    padding: 6px;
}

.turkak-second-header {
    grid-template-columns: 1fr 38mm;
}

.turkak-logo {
    display: block;
    max-height: 24mm;
    max-width: 38mm;
    object-fit: contain;
}

.turkak-lab-address {
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
}

.turkak-accreditation {
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.turkak-accreditation img {
    display: block;
    margin: 0 auto 3px;
    max-height: 27mm;
    max-width: 24mm;
    object-fit: contain;
    width: 24mm;
}

.turkak-title {
    border: 1px solid #000;
    border-top: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
    padding: 7px;
    text-align: center;
}

.turkak-title span,
.turkak-info-table span,
.turkak-signature-table span {
    font-size: 9px;
    font-weight: 400;
}

.turkak-info-table,
.turkak-signature-table,
.turkak-meta-table,
.turkak-results-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.turkak-info-table th,
.turkak-info-table td,
.turkak-signature-table th,
.turkak-signature-table td,
.turkak-meta-table th,
.turkak-meta-table td,
.turkak-results-table th,
.turkak-results-table td {
    border: 1px solid #000;
    padding: 4px 5px;
    vertical-align: top;
}

.turkak-info-table th {
    width: 43%;
}

.turkak-info-table td {
    min-height: 18px;
}

.turkak-accreditation-text {
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    font-size: 9.5px;
    line-height: 1.35;
    padding: 8px;
}

.turkak-accreditation-text p {
    margin: 0 0 6px;
}

.turkak-signature-table {
    margin-top: 8px;
}

.turkak-signature-table th,
.turkak-signature-table td {
    text-align: center;
    width: 20%;
}

.turkak-signature-table th {
    height: auto;
    padding: 3px 4px;
}

.turkak-signature-table td {
    height: 17mm;
    vertical-align: middle;
}

.turkak-footer {
    align-items: end;
    display: grid;
    font-size: 9px;
    gap: 8px;
    grid-template-columns: 1fr auto;
    margin-top: auto;
    padding-top: 8px;
}

.turkak-footer span:first-child {
    grid-column: 1 / -1;
}

.turkak-footer span:nth-child(2) {
    white-space: nowrap;
}

.turkak-verification {
    align-items: center;
    border: 1px solid #000;
    display: grid;
    font-size: 8.8px;
    gap: 6px;
    grid-template-columns: 1fr auto;
    line-height: 1.3;
    margin-top: auto;
    padding: 4px 5px;
}

.turkak-verification + .turkak-footer {
    margin-top: 0;
}

.turkak-verification-qr {
    display: block;
    height: 22mm;
    width: 22mm;
}

.standard-report-verification {
    margin-top: 24px;
}

.turkak-meta-table {
    margin-top: 8px;
}

.turkak-meta-table th {
    width: 38%;
}

.turkak-section-title {
    border: 1px solid #000;
    border-bottom: 0;
    font-size: 12px;
    font-weight: 700;
    margin: 10px 0 0;
    padding: 5px;
}

.turkak-results-table th {
    text-align: center;
}

.turkak-results-table th:nth-child(1) {
    width: 25%;
}

.turkak-results-table th:nth-child(2) {
    width: 18%;
}

.turkak-results-table th:nth-child(3) {
    width: 28%;
}

.turkak-results-table th:nth-child(4) {
    width: 18%;
}

.turkak-results-table th:nth-child(5) {
    width: 11%;
}

.turkak-results-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
}

.turkak-evaluation {
    font-size: 9.5px;
}

.turkak-notes {
    font-size: 8.6px;
    line-height: 1.25;
    margin-top: 8px;
}

.turkak-notes ol {
    margin: 3px 0 0 16px;
    padding: 0;
}

.turkak-notes li {
    margin-bottom: 2px;
}

.customer-report-table {
    min-width: 760px;
}

.customer-report-table th,
.customer-report-table td {
    white-space: nowrap;
}

@media print {
    @page {
        margin: 8mm;
        size: A4 portrait;
    }

    html {
        height: auto !important;
        min-height: 0 !important;
    }

    body {
        background: #fff;
        display: block;
        height: auto !important;
        margin: 0;
        min-height: 0 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        width: auto;
    }

    header,
    footer,
    .no-print {
        display: none !important;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .flex-grow-1 {
        flex-grow: 0 !important;
    }

    main {
        padding: 0 !important;
    }

    .turkak-report {
        background: #fff;
        margin: 0;
        min-width: 0;
        padding: 0;
        width: 100%;
    }

    .turkak-page {
        border: 0;
        box-shadow: none;
        break-after: auto;
        display: flex;
        flex-direction: column;
        height: auto;
        margin: 0;
        max-height: none;
        min-height: 278mm;
        overflow: visible;
        page-break-after: auto;
        padding: 0;
        width: 100%;
    }

    .turkak-page + .turkak-page {
        break-before: page;
        page-break-before: always;
    }

    .turkak-header,
    .turkak-second-header {
        gap: 5px;
        padding: 4px;
    }

    .turkak-title {
        margin-bottom: 6px;
        padding: 5px;
    }

    .turkak-info-table th,
    .turkak-info-table td,
    .turkak-signature-table th,
    .turkak-signature-table td,
    .turkak-meta-table th,
    .turkak-meta-table td,
    .turkak-results-table th,
    .turkak-results-table td {
        padding: 3px 4px;
    }

    .turkak-accreditation-text {
        font-size: 9px;
        line-height: 1.25;
        padding: 6px;
    }

    .turkak-accreditation-text p {
        margin-bottom: 4px;
    }

    .turkak-signature-table td {
        height: 15mm;
    }

    .turkak-notes {
        font-size: 7.6px;
        line-height: 1.12;
        margin-top: 6px;
    }

    .turkak-notes li {
        margin-bottom: 1px;
    }

    .turkak-footer {
        font-size: 8px;
        padding-top: 5px;
    }
}
