:root {
    --bg: #f3f5f9;
    --surface: #ffffff;
    /* Kurumsal palet (sidebar ile uyumlu bordo) */
    --brand: #7a0f1e;
    --brand-mid: #8a0616;
    --brand-deep: #63030f;
    --brand-soft: rgba(122, 15, 30, 0.09);
    --brand-border: rgba(122, 15, 30, 0.38);
    --primary: var(--brand-mid);
    --primary-dark: var(--brand-deep);
    --danger: #c41e2a;
    --danger-deep: #9f1822;
    --warning: #e9a23b;
    --success: #2e9f5a;
    --text: #1d2736;
    --muted: #6d7788;
    --border: #e5e8ef;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    background: var(--bg);
    color: var(--text);
}

/* Detay ekranı fontunu garantiye al */
body.page-view .content,
body.page-view .content *:not(svg):not(path) {
    font-family: "Times New Roman", Times, serif;
}

/* Detay ekranında rich text içi stiller fontu ezmesin */
body.page-view .detail-box,
body.page-view .detail-box * {
    font-family: "Times New Roman", Times, serif !important;
}

/* Mobil UA güvenli modu: media query kaçarsa bile ekranı taşırma */
.is-mobile-agent .layout {
    grid-template-columns: 1fr !important;
}

.is-mobile-agent .sidebar {
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: auto;
    height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.is-mobile-agent .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: wrap;
}

.is-mobile-agent .menu-item {
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 11px;
    border-radius: 9px;
    flex: 0 0 auto;
}

.is-mobile-agent .content {
    width: 100%;
    max-width: 100%;
    padding: 12px;
}

.is-mobile-agent .card,
.is-mobile-agent .filters,
.is-mobile-agent .kit-filters,
.is-mobile-agent .js-mobile-compact,
.is-mobile-agent .form-grid-top,
.is-mobile-agent .form-grid-2,
.is-mobile-agent .details,
.is-mobile-agent .detail-meta-grid {
    max-width: 100%;
    grid-template-columns: 1fr !important;
}

.is-mobile-agent table,
.is-mobile-agent .content-list table,
.is-mobile-agent .content-kit table {
    min-width: 0 !important;
    width: 100%;
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.auth-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 10px;
}

.layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.layout.sidebar-collapsed {
    grid-template-columns: 86px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, #8a0616 0%, #63030f 100%);
    color: #fff;
    padding: 20px 14px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 18px;
}

.brand {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 0;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fbdfe2;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.menu-icon {
    min-width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 16px;
    height: 16px;
    opacity: 0.96;
}

.menu-label {
    white-space: nowrap;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.menu-group {
    margin-bottom: 8px;
}

.menu-group summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

.menu-group summary::-webkit-details-marker {
    display: none;
}

.menu-group summary::after {
    content: "▸";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #fbdfe2;
    transition: transform 0.15s ease;
}

.menu-group[open] summary::after {
    transform: translateY(-50%) rotate(90deg);
}

.submenu {
    margin-top: 2px;
}

.submenu-item {
    margin-bottom: 6px;
    margin-left: 12px;
    padding: 9px 10px;
    font-size: 14px;
}

.layout.sidebar-collapsed .brand,
.layout.sidebar-collapsed .menu-label {
    display: none;
}

.layout.sidebar-collapsed .sidebar {
    padding: 20px 10px;
}

.layout.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

.layout.sidebar-collapsed .menu-item {
    justify-content: center;
    padding: 10px 8px;
}

.layout.sidebar-collapsed .menu-group summary {
    padding-right: 8px;
}

.layout.sidebar-collapsed .menu-group summary::after {
    display: none;
}

.layout.sidebar-collapsed .submenu {
    margin-top: 0;
}

.layout.sidebar-collapsed .submenu-item {
    margin-left: 0;
}

.content {
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.date {
    color: var(--muted);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.03);
}

.card.danger-zone {
    border-color: rgba(220, 38, 38, 0.35);
    background: #fff8f8;
}

.card.danger-zone code {
    font-size: 0.92em;
}

.mono-phrase {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 8px 0 12px;
    padding: 10px 12px;
    background: #1f2937;
    color: #f8fafc;
    border-radius: 8px;
}

.reset-samples-form .field {
    max-width: 32rem;
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 10px;
}

.kit-filters {
    grid-template-columns: 2.8fr 1fr 1fr 1fr auto auto auto;
}

input,
select,
textarea,
button {
    font-family: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8dce8;
    border-radius: 9px;
    font-size: 14px;
    padding: 10px 11px;
    background: #fff;
}

textarea {
    min-height: 86px;
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

th,
td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}

th {
    color: #5f6980;
    font-weight: 700;
}

/* Liste sayfası: bir kademe daha büyük metin */
.content-list .topbar h1 {
    font-size: 30px;
}

/* Liste ekranı: referans görseldeki gibi sans-serif yazı */
body.page-list .content,
body.page-list .content *:not(svg):not(path) {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.content-list .date {
    font-size: 15px;
}

.content-list .filters input,
.content-list .filters select {
    font-size: 15px;
    padding: 11px 12px;
}

.content-list .filters .btn {
    font-size: 14px;
}

.content-list .list-filters {
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    align-items: end;
}

.content-list .list-filters .filter-field {
    min-width: 0;
}

.content-list .list-filters .filter-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    color: #4b5565;
    font-weight: 600;
}

.content-list .list-filters .filter-submit .btn {
    min-width: 110px;
    min-height: 40px;
}

.list-filter-extra {
    margin-top: 8px;
}

.content-list table th,
.content-list table td {
    font-size: 15px;
    padding: 7px 5px;
}

/* Sıralama başlık linkleri normal başlık gibi görünsün */
.content-list table th a,
.content-list table th a:visited,
.content-list table th a:hover,
.content-list table th a:active,
.content-list table th a:focus {
    color: inherit;
    text-decoration: none;
}

.content-list .inline-value {
    font-size: 17px;
}

.content-list table {
    min-width: 840px;
}

.content-kit table th,
.content-kit table td {
    font-size: 16px;
}

.content-list .pagination {
    font-size: 14px;
}

.content-list .badge.badge-status {
    font-size: 12px;
}

.content-list .bar-item {
    font-size: 13px;
    min-height: 32px;
}

.content-list .bar-item-icon {
    width: 32px;
    min-width: 32px;
}

/* Gönderen: dar sütun, uzun metin üç nokta (liste) */
.content-list th.col-sender,
.content-list td.col-sender {
    max-width: 11.5rem;
    width: 11%;
}

.content-list td.col-sender {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sonuç Tarihi, Rapor No ve Kargo Ücreti kolonlarını ferahlat */
.content-list th.col-result-date,
.content-list td.col-result-date,
.content-list th.col-report-no,
.content-list td.col-report-no,
.content-list th.col-cargo-fee,
.content-list td.col-cargo-fee {
    padding-left: 12px;
    padding-right: 12px;
}

.content-list th.col-result-date,
.content-list td.col-result-date {
    min-width: 9.6rem;
}

.content-list th.col-report-no,
.content-list td.col-report-no {
    min-width: 8.8rem;
}

.content-list th.col-cargo-fee,
.content-list td.col-cargo-fee {
    min-width: 8.6rem;
}

.table-wrap {
    overflow-x: auto;
}

.report-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.66);
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.report-preview-modal {
    width: min(1280px, 96vw);
    height: min(90vh, 920px);
    background: #fff;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    border-radius: 12px;
    border: 1px solid #d8dce8;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.3);
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

.report-preview-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.report-preview-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
}

.report-preview-modal-title {
    color: #1f2937;
    font-size: 15px;
}

.report-preview-close {
    border: 1px solid #cfd6e3;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.report-preview-nav,
.report-preview-zoom-out,
.report-preview-zoom-in,
.report-preview-fullscreen {
    border: 1px solid #cfd6e3;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    min-width: 34px;
}

.report-preview-stage {
    width: 100%;
    height: 100%;
    overflow: auto;
    background: #f8fafc;
}

.report-preview-modal-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.report-dropzone {
    border: 2px dashed #cfd6e3;
    border-radius: 10px;
    padding: 14px;
    background: #f8fbff;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.report-dropzone.is-dragover {
    border-color: #3b82f6;
    background: #eef6ff;
}

.report-dropzone input[type="file"] {
    margin-bottom: 8px;
}

.report-dropzone-text {
    margin: 0 0 8px;
    color: #374151;
    font-size: 13px;
}

.report-files-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.report-files-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    font-size: 13px;
}

.report-actions {
    min-width: 170px;
    gap: 6px;
}

.empty {
    text-align: center;
    color: var(--muted);
}

.actions {
    display: flex;
    align-items: center;
    vertical-align: middle;
    white-space: nowrap;
    min-width: 240px;
    max-width: none;
    overflow: visible;
    padding-left: 14px;
}

.actions form {
    margin: 0;
}

/* Liste: görseldeki gibi tek satır bitişik aksiyon çubuğu (mavi / gri / sarı / yeşil / mor / kırmızı) */
.record-action-bar {
    display: inline-flex;
    align-items: stretch;
    flex-wrap: nowrap;
    border-radius: 6px;
    overflow: visible;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.record-action-bar > * {
    margin-left: -1px;
}

.record-action-bar > *:first-child {
    margin-left: 0;
}

.bar-form {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.bar-form-inner {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.bar-form-inner > * + * {
    margin-left: -1px;
}

.bar-item {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: filter 0.12s ease;
}

.bar-item svg {
    flex-shrink: 0;
    display: block;
}

.bar-item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    z-index: 2;
}

/* Görüntüle — mavi çerçeve, beyaz zemin */
.bar-item-view {
    background: #fff;
    color: #1d4ed8;
    border-color: #2563eb;
    z-index: 3;
}

.bar-item-view:hover {
    background: #eff6ff;
}

/* Düzenle — turuncu çerçeve (görselde yok; işlev için ek) */
.bar-item-edit {
    background: #fff;
    color: #c2410c;
    border-color: #ea580c;
    z-index: 2;
}

.bar-item-edit:hover {
    background: #fff7ed;
}

/* Durum ikonları — dolgu tonları (görsel ile uyumlu) */
.bar-item-icon {
    width: 30px;
    min-width: 30px;
    padding: 0;
    border-radius: 0;
}

.bar-item-status-grey {
    background: #52525b;
    color: #fff;
    border-color: #3f3f46;
}

.bar-item-status-yellow {
    background: #eab308;
    color: #fff;
    border-color: #ca8a04;
}

.bar-item-status-green {
    background: #15803d;
    color: #fff;
    border-color: #166534;
}

.bar-item-icon:hover {
    filter: brightness(1.08);
}

/* Tekrarla — mor dolgu (Sil’den önce) */
.bar-item-dup {
    background: #7c3aed;
    color: #fff;
    border-color: #6d28d9;
}

.bar-item-dup:hover {
    filter: brightness(1.07);
}

/* Sil — kırmızı çerçeve, kırmızı içerik */
.bar-item-delete {
    background: #fff;
    color: #dc2626;
    border-color: #dc2626;
    padding: 0 9px;
    z-index: 3;
}

.bar-item-delete:hover {
    background: #fef2f2;
}

.bar-item-delete svg,
.bar-item-delete span {
    color: inherit;
}

.record-action-bar > a.bar-item-view:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.record-action-bar > form:last-child .bar-item-delete,
.record-action-bar > form:last-child .bar-item-dup {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.record-action-bar > a:only-child {
    border-radius: 6px;
}

.record-action-bar > form:only-child .bar-item {
    border-radius: 6px;
}

.btn-icon {
    padding: 8px;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    display: block;
}

.btn.btn-icon.btn-light {
    border-radius: 10px;
}

.inline-status-form {
    margin: 0;
}

.inline-status-form select {
    min-width: 130px;
    padding: 6px 8px;
    font-size: 12px;
}

.btn {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.2;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--brand-mid);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(180deg, #9a1528 0%, var(--brand-mid) 45%, var(--brand-deep) 100%);
    color: #fff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.btn-primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 3px 10px rgba(99, 3, 15, 0.28);
}

.btn-primary:active {
    transform: translateY(1px);
    filter: brightness(0.97);
}

.btn-warning {
    background: linear-gradient(180deg, #b91c1c 0%, #8f1420 100%);
    color: #fff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.btn-warning:hover {
    filter: brightness(1.06);
    box-shadow: 0 3px 10px rgba(99, 3, 15, 0.25);
}

.btn-warning:active {
    transform: translateY(1px);
}

.btn-danger {
    background: linear-gradient(180deg, #e11d2e 0%, var(--danger) 50%, var(--danger-deep) 100%);
    color: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.btn-danger:hover {
    filter: brightness(1.05);
    box-shadow: 0 3px 10px rgba(196, 30, 42, 0.35);
}

.btn-danger:active {
    transform: translateY(1px);
}

.btn-dup {
    background: #7c3aed;
    color: #fff;
    border-color: #6d28d9;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.btn-dup:hover {
    filter: brightness(1.06);
    box-shadow: 0 3px 10px rgba(109, 40, 217, 0.28);
}

.btn-light {
    background: #fff;
    color: var(--brand);
    border-color: var(--brand-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-light:hover {
    background: var(--brand-soft);
    border-color: var(--brand-mid);
    color: var(--brand-deep);
}

.btn-light:active {
    transform: translateY(1px);
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
    background: #f1f3f5;
    color: #9aa2ad;
    border-color: #cfd6df;
    box-shadow: none;
    pointer-events: none;
    cursor: not-allowed;
}

.badge {
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.1;
}

/* Durum sütunu: hap yerine yumuşak köşeli dikdörtgen (görsel referansı) */
.badge.badge-status {
    border-radius: 7px;
    padding: 3px 7px;
    font-weight: 700;
}

.badge-info {
    background: #4f7af8;
    color: #fff;
}

/* Durum rozetleri — aksiyon çubuğu tonlarıyla uyumlu, mat / düşük doygunluk */
.badge-grey {
    background: #6b7f92;
    color: #f3f4f6;
}

.badge-yellow {
    background: #ffc21a;
    color: #fff;
}

.badge-green {
    background: #229a56;
    color: #fff;
}

.badge-success {
    background: var(--success);
    color: #fff;
}

.badge-warning {
    background: #e8a13b;
    color: #fff;
}

.badge-danger {
    background: var(--danger);
    color: #fff;
}

.status-btn {
    border: 0;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 0;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-btn-grey {
    background: #6b7280;
}

.status-btn-yellow {
    background: #eab308;
    color: #fff;
}

.status-btn-green {
    background: #22c55e;
}

.status-btn[disabled] {
    opacity: 0.75;
    cursor: not-allowed;
}

.inline-status-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.status-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.status-btn-form {
    margin: 0;
}

.inline-field-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inline-input {
    width: 110px;
    max-width: 110px;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid #d8dce8;
    background: #fff;
}

.inline-value {
    color: #374151;
    font-size: 13px;
}

.icon-edit-btn {
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.icon-edit-btn:hover {
    color: #111827;
}

.icon-clear-btn {
    border: 0;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    display: none;
}

.icon-clear-btn:hover {
    color: #b91c1c;
}

.inline-edit-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inline-editor {
    display: none;
    align-items: center;
    gap: 4px;
}

.inline-editor.active {
    display: inline-flex;
}

.inline-editor-input {
    width: 110px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
}

.inline-ok-btn,
.inline-trash-btn,
.inline-cancel-btn {
    border: 0;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.inline-ok-btn {
    background: #22c55e;
}

.inline-trash-btn {
    background: #dc2626;
}

.inline-cancel-btn {
    background: #6b7280;
}

.alert {
    border-radius: 9px;
    padding: 12px 13px;
    margin-bottom: 14px;
    font-size: 14px;
}

.alert-success {
    background: #e8f8ee;
    color: #1f6d40;
    border: 1px solid #bde8cb;
}

.alert-danger {
    background: #fff0f0;
    color: #8f2222;
    border: 1px solid #f8c8c8;
}

.alert-info {
    background: #eef6ff;
    color: #1b4e8a;
    border: 1px solid #cfe4ff;
}

.muted {
    color: var(--muted);
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-actions {
    display: flex;
    gap: 8px;
}

.record-form {
    display: grid;
    gap: 14px;
}

.form-section {
    border: 1px solid #e8ecf3;
    border-radius: 10px;
    padding: 12px;
    background: #fbfcfe;
}

.kit-quick-add-panel {
    margin: 10px 0 14px;
    padding: 10px;
    border: 1px solid #dbe4f3;
    border-radius: 8px;
    background: #f8fbff;
}

.kit-quick-add-panel h4 {
    margin: 0 0 6px;
    font-size: 15px;
}

.mobile-card-list {
    display: grid;
    gap: 8px;
}

.mobile-data-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.mobile-data-card-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.mobile-data-card-meta {
    color: #374151;
    font-size: 13px;
    margin-bottom: 3px;
}

.list-note-indicator {
    display: inline-block;
    color: #dc2626;
    font-size: 13px;
    margin-right: 5px;
    vertical-align: middle;
    line-height: 1;
}

.mobile-data-card-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.mobile-info-empty {
    padding: 12px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
    background: #f9fafb;
    text-align: center;
}

.mobile-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.mobile-preview-modal {
    width: min(560px, 100%);
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d8dce8;
    padding: 12px;
}

.mobile-preview-close {
    border: 1px solid #cfd6e3;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 10px;
}

.mobile-preview-content {
    font-size: 15px;
    line-height: 2.05;
    color: #1f2937;
}

.form-grid-top {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.form-grid-2 {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.field label {
    display: block;
    font-size: 13px;
    color: #4b5565;
    margin-bottom: 6px;
    font-weight: 600;
}

.field small {
    display: block;
    margin-top: 5px;
    color: #7c879a;
    font-size: 12px;
}

.quick-builder {
    margin-bottom: 8px;
    padding: 9px;
    border: 1px solid #dbe4f2;
    border-radius: 8px;
    background: #f7fbff;
}

.quick-builder-inline {
    margin: 0;
    padding: 8px;
    border: 0;
    border-top: 1px solid #e6ecf7;
    border-radius: 0;
    background: rgba(249, 251, 255, 0.96);
}

.quick-builder-in-editor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

.quick-builder-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(110px, 0.45fr) minmax(220px, 1fr) auto;
    align-items: center;
}

.quick-builder-grid-tests {
    grid-template-columns: minmax(160px, 0.45fr) 1fr auto;
}

.quick-builder-grid-tests #test-helper-name {
    grid-column: auto;
}

.quick-builder-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-builder-inline .btn {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 12px;
}

.quick-builder-inline input,
.quick-builder-inline select {
    min-height: 32px;
    font-size: 13px;
}

#test-helper-name {
    width: 100%;
}

.test-selected-list {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
}

.test-selected-empty {
    color: #6b7280;
    font-size: 12px;
}

.test-chip {
    border: 1px solid #c8d8f1;
    background: #edf4ff;
    color: #1f3a5f;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
}

.quick-builder-inline small {
    margin-top: 6px;
}

.record-form textarea {
    min-height: 84px;
}

.record-form .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.quote-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.quote-template-links {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.quote-builder-table th,
.quote-builder-table td,
.quote-preview-table th,
.quote-preview-table td {
    font-size: 13px;
}

.quote-builder-table input,
.quote-builder-table select {
    width: 100%;
}

.quote-price-table input {
    width: 100%;
}

.quote-price-filters {
    margin-bottom: 10px;
}

.quote-builder-table textarea.quote-desc-input {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    line-height: 1.3;
}

.quote-discount-input-wrap {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    border: 1px solid #cfd9ea;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.quote-discount-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-weight: 700;
    color: #374151;
    background: #f3f6fb;
    border-right: 1px solid #cfd9ea;
}

.quote-discount-input-wrap input {
    width: 100%;
    border: 0;
    border-radius: 0;
}

.quote-builder-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.barcode-builder-form .form-actions.barcode-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: end;
}

.barcode-preview-card h3 {
    margin-bottom: 10px;
}

.barcode-preview-wrap {
    border: 1px dashed #cfd9ea;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barcode-preview-wrap svg {
    max-width: 100%;
    height: auto;
}

.barcode-preview-wrap canvas {
    max-width: 100%;
    height: auto;
}

.barcode-preview-wrap img {
    max-width: 100%;
    height: auto;
    display: block;
}

.barcode-preview-wrap [hidden] {
    display: none !important;
}

.quote-preview-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.quote-print-header {
    border-bottom: 0;
    padding: 20px 0 16px;
    margin-bottom: 6px;
    display: block;
    text-align: center;
    position: relative;
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

.quote-print-brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #737373;
}

.quote-print-sub {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #737373;
    letter-spacing: 0.4px;
}

.quote-print-logo {
    position: absolute;
    right: 0;
    top: 0;
    width: 104px;
    height: auto;
    object-fit: contain;
}

.quote-preview-table thead th {
    background: #b10011;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.quote-preview-table td,
.quote-preview-table th {
    border: 1px solid #000;
}

.quote-preview-table {
    border: 2.2px solid #000;
    border-collapse: collapse;
    table-layout: fixed;
    width: auto;
    min-width: 740px;
    box-sizing: border-box;
}

.quote-preview-table thead th {
    border: 2.2px solid #000;
}

.quote-disclaimer {
    margin-top: 8px;
    font-size: 13px;
}

.quote-print-root:not(.quote-pdf-capture) .table-wrap,
.quote-print-root:not(.quote-pdf-capture) .quote-meta-lines,
.quote-print-root:not(.quote-pdf-capture) .quote-disclaimer {
    width: 94%;
    margin-left: auto;
    margin-right: auto;
}

.quote-print-root:not(.quote-pdf-capture) .quote-preview-table {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: auto;
    margin-right: auto;
}

.quote-print-root:not(.quote-pdf-capture) .quote-date-line,
.quote-print-root:not(.quote-pdf-capture) .quote-company-line {
    width: 100%;
    margin-right: 0;
}

.quote-print-root .quote-disclaimer {
    margin-top: 8px;
}

.quote-company-line {
    text-align: right;
    font-weight: 700;
    font-size: 13px;
    margin: 0 0 2px 0;
}

.quote-date-line {
    text-align: right;
    font-weight: 700;
    font-size: 13px;
    margin: 0 0 4px 0;
}

.quote-print-footer {
    margin-top: 10px;
    border-top: 1px solid #d9e1ee;
    padding-top: 8px;
    color: #5b6578;
    font-size: 12px;
    text-align: center;
    line-height: 1.45;
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

.quote-pdf-capture {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 1123px;
    --quote-content-offset: 12mm;
    box-sizing: border-box;
    padding-top: 48mm;
    padding-bottom: 10mm;
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

.quote-print-root,
.quote-preview-table,
.quote-company-line,
.quote-disclaimer {
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

.quote-pdf-capture .quote-print-header {
    margin-top: 20mm;
    padding-top: 8mm;
}

.quote-pdf-capture .quote-print-logo {
    top: -20mm;
    right: 0;
}

.quote-meta-lines {
    width: 100%;
    display: block;
}

.quote-pdf-capture .quote-meta-lines {
    margin-top: 0;
    transform: translateY(var(--quote-content-offset));
}

.quote-pdf-capture .quote-date-line {
    margin-top: 0;
    margin-bottom: 0.6mm;
}

.quote-pdf-capture .quote-company-line {
    margin-top: 0;
    margin-bottom: 1.2mm;
}

.quote-pdf-capture .table-wrap,
.quote-pdf-capture .quote-meta-lines,
.quote-pdf-capture .quote-disclaimer {
    width: 94%;
    margin-left: auto;
    margin-right: auto;
    transform: translateY(var(--quote-content-offset));
}

.quote-pdf-capture .table-wrap {
    margin-top: 0.8mm;
    overflow: visible !important;
    display: block;
}

.quote-pdf-capture .quote-preview-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    table-layout: fixed;
}

.quote-pdf-capture .quote-date-line,
.quote-pdf-capture .quote-company-line {
    width: 100%;
    margin-right: 0;
}

.quote-pdf-capture .quote-disclaimer {
    margin-top: 1.2mm;
}

.quote-pdf-capture .quote-preview-table th,
.quote-pdf-capture .quote-preview-table td {
    font-size: 14.5px;
    padding: 9px 7px;
}

.quote-pdf-capture .quote-preview-table thead th {
    font-size: 14px;
    padding-top: 11px;
    padding-bottom: 11px;
}

.quote-preview-table th,
.quote-preview-table td {
    font-size: 14px;
    line-height: 1.25;
}

.quote-preview-table td:first-child,
.quote-preview-table th:first-child {
    text-align: center;
    min-width: 62px;
}

.quote-preview-table td:last-child,
.quote-preview-table th:last-child {
    white-space: nowrap;
    text-align: center;
    min-width: 170px;
}

/* 3 kolon görünümünü (Sıra No / Testler / Birim Fiyat) referans görsele sabitle */
.quote-preview-table.quote-cols-basic td:first-child,
.quote-preview-table.quote-cols-basic th:first-child {
    width: 12% !important;
    min-width: 74px;
}

.quote-preview-table.quote-cols-basic td:nth-child(2),
.quote-preview-table.quote-cols-basic th:nth-child(2) {
    width: 59% !important;
}

.quote-preview-table.quote-cols-basic td:last-child,
.quote-preview-table.quote-cols-basic th:last-child {
    width: 29% !important;
    min-width: 178px;
}

.quote-pdf-capture .quote-print-footer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 94%;
    margin: 0;
    padding-top: 2.5mm;
}

@media print {
    @page {
        margin: 10mm 8mm 12mm 8mm;
    }
    body * {
        visibility: hidden !important;
    }
    .quote-print-root,
    .quote-print-root * {
        visibility: visible !important;
    }
    .quote-print-root {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none !important;
        border: 0 !important;
        margin: 0 !important;
        padding: 18mm 0 22mm 0 !important;
        min-height: 270mm;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        font-family: Calibri, "Segoe UI", Arial, sans-serif !important;
    }
    .quote-print-header {
        padding-top: 14mm !important;
    }
    .quote-company-line {
        margin-top: 0 !important;
        margin-bottom: 2mm !important;
    }
    .quote-date-line {
        margin-top: 24mm !important;
        margin-bottom: 2mm !important;
    }
    .quote-print-root .table-wrap {
        margin-top: 1mm !important;
    }
    .quote-builder-actions {
        display: none !important;
    }
    .quote-print-root .table-wrap {
        overflow: visible !important;
        max-width: 100% !important;
    }
    .quote-print-root table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
    }
    .quote-preview-table th,
    .quote-preview-table td {
        border: 1px solid #000 !important;
        font-size: 13.5px !important;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }
    .quote-preview-table {
        border: 2.2px solid #000 !important;
        border-collapse: collapse !important;
    }
    .quote-preview-table thead th {
        background: #b10011 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border: 2.2px solid #000 !important;
    }
    .quote-print-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 14mm;
        margin: 0 !important;
        padding-top: 3mm;
        border-top: 1px solid #d9e1ee;
        text-align: center;
        background: #fff;
        z-index: 2;
    }
    .quote-company-line {
        font-size: 14px;
        margin-bottom: 6px;
    }
    .quote-date-line {
        font-size: 12px;
        margin-bottom: 4px;
    }
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 14px;
}

.analysis-chart-box {
    border: 1px solid #dbe6f6;
    border-radius: 12px;
    padding: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.analysis-chart-box h4 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #1e3a5f;
}

.analysis-bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 52px;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.analysis-bar-label {
    font-size: 13px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analysis-bar-track {
    height: 14px;
    border-radius: 999px;
    background: #dde8f8;
    overflow: hidden;
}

.analysis-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f7af8, #2563eb);
    border-radius: 999px;
}

.analysis-bar-fill-city {
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.analysis-bar-value {
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.analysis-pie-wrap {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 14px;
    align-items: start;
}

.analysis-pie {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 1px solid #d3e2f7;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.analysis-pie-legend {
    display: grid;
    gap: 6px;
    max-height: 230px;
    overflow: auto;
    padding-right: 4px;
}

.analysis-pie-legend-item {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    line-height: 1.35;
}

.analysis-pie-legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.analysis-pie-legend-item .name {
    color: #0f172a;
}

.analysis-pie-legend-item .meta {
    color: #334155;
    font-weight: 600;
}

.card > .alert.alert-info {
    border: 1px solid #cadcf7;
    background: #eef5ff;
    border-radius: 10px;
}

.details {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 10px;
}

.details-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
}

.detail-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-header-top h2 {
    margin: 0;
    font-size: 32px;
}

.detail-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.detail-header-actions form {
    margin: 0;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 14px 24px;
    font-size: 14px;
    line-height: 1.5;
}

.detail-section h3 {
    margin: 18px 0 12px;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.35;
}

.detail-section p {
    margin: 10px 0;
    line-height: 1.6;
}

.detail-box {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 6px;
    padding: 14px;
    min-height: 42px;
    margin-bottom: 16px;
    line-height: 1.65;
}

.rte {
    border: 1px solid #d8dce8;
    border-radius: 8px;
    overflow: visible;
    background: #fff;
    position: relative;
}

.rte-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #e5e8ef;
    background: #f8fafc;
    border-radius: 7px 7px 0 0;
    overflow: visible;
}

.rte-toolbar button {
    border: 1px solid #cfd6e3;
    background: #fff;
    color: #1f2937;
    border-radius: 6px;
    width: 30px;
    height: 28px;
    padding: 0;
    cursor: pointer;
}

.rte-toolbar .rte-font-select {
    height: 28px;
    max-width: 11rem;
    padding: 2px 8px;
    border: 1px solid #cfd6e3;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font-size: 12px;
    cursor: pointer;
}

.rte-toolbar .rte-font-select:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

/* Word / Office benzeri yazı rengi seçici */
.rte-color-picker {
    position: relative;
    flex-shrink: 0;
    overflow: visible;
}

.rte-color-trigger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    min-width: 34px;
    height: 28px;
    padding: 1px 6px 3px;
    border: 1px solid #cfd6e3;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    line-height: 1;
}

.rte-color-trigger:hover {
    background: #f1f5f9;
    border-color: #b8c4d8;
}

.rte-color-trigger-a {
    font-size: 15px;
    font-weight: 700;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.rte-color-trigger-bar {
    display: block;
    width: 20px;
    height: 3px;
    margin-top: 1px;
    background: #000;
    border-radius: 1px;
}

.rte-color-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 5000;
    box-sizing: border-box;
    /* 10×18px + 9×2px gap = 198px içerik; sabit width + border-box padding/border içeriği sıkıştırıyordu */
    width: max-content;
    min-width: 222px;
    max-width: min(232px, calc(100vw - 20px));
    max-height: none;
    overflow: visible;
    padding: 8px 12px 12px;
    background: #fff;
    border: 1px solid #d8dce8;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.rte-color-auto {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 6px 4px;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 13px;
    color: #1f2937;
    cursor: pointer;
    text-align: left;
}

.rte-color-auto:hover {
    background: #f1f5f9;
}

.rte-color-auto-swatch {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #4b5563;
    background: #000;
    border-radius: 1px;
}

.rte-color-auto-label {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rte-color-section-title {
    margin: 10px 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
}

.rte-color-section-title:first-of-type {
    margin-top: 4px;
}

.rte-theme-grid {
    display: grid;
    grid-template-columns: repeat(10, 18px);
    grid-template-rows: repeat(6, 18px);
    gap: 2px;
    width: max-content;
    max-width: 100%;
    box-sizing: content-box;
}

.rte-standard-row {
    display: grid;
    grid-template-columns: repeat(10, 18px);
    gap: 2px;
    width: max-content;
    max-width: 100%;
    box-sizing: content-box;
}

.rte-swatch {
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 1px;
    cursor: pointer;
    vertical-align: top;
}

.rte-swatch:hover {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    z-index: 1;
}

.rte-swatch-std {
    border-color: rgba(0, 0, 0, 0.22);
}

.rte-editor {
    min-height: 96px;
    padding: 10px 10px 74px;
    font-size: 14px;
    line-height: 1.75;
    outline: none;
    border-radius: 0 0 7px 7px;
    overflow: hidden;
}

.rte[data-target="requested_tests"] .rte-editor {
    padding-bottom: 132px;
}

/* Kayıt giriş/düzenleme ekranında metinler daha ferah olsun */
.record-form .rte-editor p {
    margin: 0 0 10px;
}

.record-form .rte-editor li {
    margin-bottom: 6px;
}

.rte-source {
    display: none;
}

.hover-preview {
    position: fixed;
    z-index: 9999;
    box-sizing: border-box;
    width: min(320px, calc(100vw - 24px));
    min-width: 260px;
    max-width: 320px;
    max-height: min(46vh, 300px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #2f3d54;
    color: #f1f5ff;
    border-radius: 8px;
    padding: 12px 14px 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
    font-size: 14px;
    line-height: 2.35;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: auto;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.hover-preview .preview-title,
.mobile-preview-content .preview-title {
    display: block;
    margin: 12px 0 8px;
    font-weight: 700;
    color: #9fb6ff;
}

.hover-preview .preview-body,
.mobile-preview-content .preview-body {
    display: block;
    margin: 0 0 38px;
    line-height: 2.3;
}

.hover-preview .preview-body p,
.mobile-preview-content .preview-body p {
    margin: 0 0 20px;
}

.hover-preview .preview-body br,
.mobile-preview-content .preview-body br {
    content: "";
    display: block;
    margin-bottom: 14px;
}

.hover-preview .preview-body ul,
.hover-preview .preview-body ol,
.mobile-preview-content .preview-body ul,
.mobile-preview-content .preview-body ol {
    margin: 0 0 10px 18px;
}

@media (max-width: 1000px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        padding: 12px;
        position: sticky;
        top: 0;
        z-index: 20;
        min-height: auto;
        height: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    }
    .brand {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .sidebar nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .menu-item {
        margin-bottom: 0;
        white-space: nowrap;
        font-size: 13px;
        padding: 10px 11px;
        border-radius: 9px;
        flex: 0 0 auto;
    }
    .content {
        padding: 12px;
    }
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 10px;
    }
    .topbar h1 {
        font-size: 21px;
    }
    .date {
        font-size: 12px;
    }
    .card {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    .filters {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .form-grid-top,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .record-form .form-section {
        display: grid;
        gap: 10px;
    }
    .record-form .form-section > .field:not(.form-actions),
    .record-form .form-section > .form-grid-top > .field:not(.form-actions),
    .record-form .form-section > .form-grid-2 > .field:not(.form-actions) {
        background: #f8fbff;
        border: 1px solid #dbe5f4;
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }
    .record-form .form-section > .form-grid-top,
    .record-form .form-section > .form-grid-2 {
        gap: 10px;
    }
    .record-form .field label {
        font-size: 13px;
        margin-bottom: 7px;
        color: #374151;
    }
    .record-form .field input,
    .record-form .field select,
    .record-form .field textarea {
        background: #ffffff;
        border-color: #cfd9ea;
    }
    .record-form .rte {
        border-radius: 10px;
        overflow: hidden;
        border-color: #cfd9ea;
    }
    .record-form .rte-toolbar {
        background: #f3f7ff;
        border-bottom-color: #d8e1f0;
    }
    .quick-builder-grid {
        grid-template-columns: 1fr;
    }
    .quick-builder-grid-tests {
        grid-template-columns: 1fr;
    }
    .rte-editor {
        padding-bottom: 132px;
    }
    .rte[data-target="requested_tests"] .rte-editor {
        padding-bottom: 190px;
    }
    .quote-preview-meta {
        grid-template-columns: 1fr;
    }
    .quote-tabs,
    .quote-template-links,
    .quote-builder-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .quote-tabs .btn,
    .quote-template-links .btn,
    .quote-builder-actions .btn {
        width: 100%;
    }
    .barcode-builder-form .form-actions.barcode-actions .btn {
        width: 100%;
    }
    .quote-builder-table {
        min-width: 0;
    }
    .quote-price-table {
        min-width: 620px;
    }
    .quote-builder-table th,
    .quote-builder-table td,
    .quote-preview-table th,
    .quote-preview-table td {
        font-size: 13px;
        padding: 7px 6px;
    }
    .quote-builder-form .form-grid-2 > .field {
        background: #f8fbff;
        border: 1px solid #dbe5f4;
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }
    .quote-builder-form .quote-price-filters {
        grid-template-columns: 1fr;
    }
    .quote-builder-form .quote-price-filters .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .quote-builder-form .quote-price-filters > .field {
        background: #f8fbff;
        border: 1px solid #dbe5f4;
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }
    .quote-builder-form .table-wrap {
        overflow: visible;
    }
    .quote-builder-table thead {
        display: none;
    }
    .quote-builder-table tbody {
        display: grid;
        gap: 10px;
    }
    .quote-builder-table .quote-row {
        display: block;
        border: 1px solid #dbe5f4;
        border-radius: 12px;
        background: #ffffff;
        padding: 8px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }
    .quote-builder-table .quote-row td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        border: 0;
        padding: 6px 4px;
    }
    .quote-builder-table .quote-row td::before {
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        color: #475569;
    }
    .quote-builder-table .quote-row td input,
    .quote-builder-table .quote-row td select,
    .quote-builder-table .quote-row td textarea,
    .quote-builder-table .quote-row td .btn {
        width: 100%;
    }
    .quote-builder-table .quote-row td:last-child .btn {
        justify-self: stretch;
    }
    .quote-print-root .table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .quote-print-root .quote-preview-table {
        min-width: 620px;
    }
    .quote-print-root .quote-date-line,
    .quote-print-root .quote-company-line {
        font-size: 12px;
    }
    .quote-discount-input-wrap {
        grid-template-columns: 32px minmax(0, 1fr);
    }
    .details {
        grid-template-columns: 1fr;
    }
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }
    table {
        min-width: 760px;
    }
    th,
    td {
        padding: 9px 8px;
        font-size: 12.5px;
    }
    .content-list .topbar h1 {
        font-size: 23px;
    }
    .content-list .date {
        font-size: 13px;
    }
    .content-list th,
    .content-list td {
        font-size: 14px;
        padding: 6px 5px;
    }
    .content-list table {
        min-width: 700px;
    }
    .content-list .bar-item {
        font-size: 12px;
        min-height: 30px;
    }
    .content-list .bar-item-icon {
        width: 30px;
        min-width: 30px;
    }
    .content-list .filters .btn {
        font-size: 13px;
    }
    .content-list .list-filters {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .content-list .list-filters .filter-submit .btn {
        width: 100%;
    }
    .content-list th.col-sender,
    .content-list td.col-sender {
        max-width: 9.5rem;
        width: 10%;
    }
    .actions {
        gap: 4px;
    }
    .btn {
        min-height: 34px;
        padding: 8px 10px;
        font-size: 12px;
        border-radius: 7px;
    }
    .status-btn {
        width: 30px;
        height: 30px;
    }
    .bar-item {
        min-height: 28px;
        font-size: 11px;
        padding: 0 7px;
    }
    .bar-item-icon {
        width: 28px;
        min-width: 28px;
    }
    .bar-item-icon svg {
        width: 13px;
        height: 13px;
    }
    .inline-editor-input,
    .inline-input {
        width: 96px;
        max-width: 96px;
    }
    .detail-header-top h2 {
        font-size: 22px;
    }
    .detail-header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .detail-section h3 {
        font-size: 18px;
    }
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    .analysis-bar-row {
        grid-template-columns: 100px 1fr 44px;
        gap: 6px;
    }
    .analysis-pie-wrap {
        grid-template-columns: 1fr;
    }
    .analysis-pie {
        margin: 0 auto;
    }
    .report-preview-modal {
        width: min(1120px, 96vw);
        height: min(88vh, 780px);
    }
    .report-dropzone {
        padding: 12px;
    }
    .report-files-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .report-files-item .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    html,
    body {
        max-width: 100vw;
        overflow-x: auto;
    }
    .layout,
    .content,
    .card {
        max-width: 100%;
    }
    .js-mobile-compact {
        grid-template-columns: 1fr !important;
    }
    .js-mobile-compact .btn {
        width: 100%;
    }
    table,
    .content-list table,
    .content-kit table {
        min-width: 0 !important;
        width: 100%;
    }
    .table-wrap {
        overflow-x: auto;
    }
    .auth-card {
        padding: 14px;
        border-radius: 12px;
    }
    .auth-card h1 {
        font-size: 20px;
    }
    .pagination {
        align-items: flex-start;
    }
    .pagination-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .pagination-actions .btn {
        width: 100%;
    }
    .inline-edit-wrap {
        gap: 4px;
    }
    .inline-ok-btn,
    .inline-cancel-btn {
        width: 22px;
        height: 22px;
    }
    .record-form .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .record-form .form-actions .btn {
        width: 100%;
    }
    .report-table th,
    .report-table td {
        font-size: 12px;
        padding: 8px 6px;
    }
    .report-actions {
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        padding-left: 0;
    }
    .report-actions .btn,
    .report-actions form,
    .report-actions form .btn {
        width: 100%;
    }
    .report-preview-modal {
        width: 100%;
        height: 88vh;
        border-radius: 10px;
    }
    .report-preview-modal-head {
        padding: 8px 10px;
    }
    .report-preview-modal-title {
        font-size: 13px;
    }
    .report-preview-toolbar {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .report-preview-nav,
    .report-preview-zoom-out,
    .report-preview-zoom-in,
    .report-preview-fullscreen,
    .report-preview-close {
        padding: 5px 8px;
        font-size: 12px;
    }
    .report-dropzone-text {
        font-size: 12px;
    }
    .quote-print-brand {
        font-size: 18px;
        line-height: 1.25;
    }
    .quote-print-sub {
        font-size: 15px;
        line-height: 1.2;
    }
    .quote-print-logo {
        width: 54px;
    }
    .quote-disclaimer,
    .quote-print-footer {
        font-size: 11px;
        line-height: 1.35;
    }
    /* Mobil teklif önizleme: inline px kolon/genişlikleri ezerek tabloyu ekrana sığdır */
    .quote-print-root .table-wrap {
        overflow-x: hidden !important;
    }
    .quote-print-root .quote-preview-table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed;
    }
    .quote-print-root .quote-preview-table col {
        width: auto !important;
    }
    .quote-print-root .quote-preview-table th,
    .quote-print-root .quote-preview-table td {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .quote-print-root .quote-preview-table td:last-child,
    .quote-print-root .quote-preview-table th:last-child,
    .quote-print-root .quote-preview-table.quote-cols-basic td:last-child,
    .quote-print-root .quote-preview-table.quote-cols-basic th:last-child {
        min-width: 0 !important;
    }
}

/* =========================================================
   MG Kayıt Site referans tasarım eşlemesi (görünüm katmanı)
   ========================================================= */

:root {
    --bg: #f8f9fa;
    --surface: #ffffff;
    --text: #212529;
    --muted: #6c757d;
    --border: #dee2e6;
    --brand: #8b0000;
    --brand-mid: #8b0000;
    --brand-deep: #6f0000;
    --brand-soft: rgba(255, 255, 255, 0.2);
    --brand-border: rgba(255, 255, 255, 0.18);
    --primary: #dc3545;
    --primary-dark: #c82333;
}

body {
    background: #f8f9fa;
    color: #212529;
}

.layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
}

.sidebar {
    background: #8b0000;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    padding: 18px 10px;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-header {
    margin-bottom: 14px;
}

.menu-item,
.menu-item.submenu-item {
    color: rgba(255, 255, 255, 0.82);
    border: 0;
    background: transparent;
    border-radius: 6px;
    padding: 10px 14px;
}

.menu-item:hover,
.menu-item.active,
.menu-group[open] > summary.menu-item {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.menu-item .menu-icon {
    color: currentColor;
}

.submenu {
    margin-left: 6px;
}

.content {
    padding: 20px;
}

.card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.topbar {
    margin-bottom: 14px;
}

.topbar h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212529;
}

.date {
    color: #6c757d;
}

.filters {
    gap: 10px;
}

.filters input,
.filters select {
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover {
    background: #c82333;
    border-color: #c82333;
}

.btn-light {
    background: #fff;
    color: #212529;
    border-color: #ced4da;
}

.btn-light:hover {
    background: #f8f9fa;
    color: #212529;
    border-color: #adb5bd;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table thead th {
    background: #fff;
    color: #495057;
    font-weight: 700;
    border-bottom: 1px solid #dee2e6;
}

table tbody td {
    color: #212529;
    border-top: 1px solid #f1f3f5;
}

table th,
table td {
    padding: 10px 12px;
}

.badge.badge-status {
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 0.8rem;
    line-height: 1.1;
}

.detail-box {
    background: #f8f9fa;
    border: 1px solid #eef2f7;
}

/* Mevcut + sonradan import edilen kayıtların görüntüsünde satır aralığı */
.detail-box .preview-body,
.detail-box {
    line-height: 2.1;
}

.detail-box p {
    margin: 0 0 16px;
}

.detail-box li {
    margin-bottom: 12px;
}

.detail-box br {
    content: "";
    display: block;
    margin-bottom: 12px;
}

.hover-preview {
    background: #2d3748;
    color: #e2e8f0;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Eski sistemle birebir: kayıt listesi işlemler buton grubu */
.content-list .record-action-bar {
    display: inline-flex;
    align-items: stretch;
    flex-wrap: nowrap;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: none;
}

.content-list .record-action-bar > * {
    margin-left: 0;
}

.content-list .record-action-bar .bar-item,
.content-list .record-action-bar .bar-form .bar-item {
    min-height: 30px;
    height: 30px;
    border-radius: 0;
    border-width: 1px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    padding: 0 8px;
    box-shadow: none;
}

.content-list .record-action-bar .bar-item-view {
    background: #fff;
    color: #0d6efd;
    border-color: #0d6efd;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.content-list .record-action-bar .bar-item-view:hover {
    background: #f2f7ff;
}

.content-list .record-action-bar .bar-item-edit {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
    width: 30px;
    min-width: 30px;
    padding: 0;
}

.content-list .record-action-bar .bar-item-status-grey {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.content-list .record-action-bar .bar-item-status-yellow {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.content-list .record-action-bar .bar-item-status-green {
    background: #198754;
    color: #fff;
    border-color: #198754;
}

.content-list .record-action-bar .bar-item-icon {
    width: 30px;
    min-width: 30px;
    padding: 0;
}

.content-list .record-action-bar .bar-item-delete {
    background: #fff;
    color: #dc3545;
    border-color: #dc3545;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    padding: 0 8px;
}

.content-list .record-action-bar .bar-item-delete:hover {
    background: #fff5f5;
}
