/* Doentra Fuar - uygulama stilleri */
.login-box { margin-top: 12vh; }
.login-logo img { max-width: 320px; width: 100%; }

/* Siparis fisi - okutma */
.scan-panel { border-left: 5px solid #f39c12; }
#scanInput { font-size: 1.6rem; letter-spacing: .08em; height: 3.4rem; }
#scanStatus { min-height: 2.4rem; font-weight: 600; }
.scan-ok { color: #1e7e34; } .scan-err { color: #c82333; }
#scanStatus.flash-ok { animation: flashok .6s; } #scanStatus.flash-err { animation: flasherr .6s; }
@keyframes flashok { from { background: #c3e6cb; } to { background: transparent; } }
@keyframes flasherr { from { background: #f5c6cb; } to { background: transparent; } }
.cam-sticky { position: sticky; top: 0; z-index: 40; background: #111; border-radius: 6px; margin-bottom: .75rem; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
#reader { position: relative; width: 100%; height: 170px; overflow: hidden; background: #000; }
#reader > div:not(.cam-aim) { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; min-height: 0 !important; border: 0 !important; }
#reader video { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
#reader canvas { display: none !important; }
.cam-aim { position: absolute; left: 8%; right: 8%; top: 50%; height: 0; border-top: 2px solid rgba(255,64,64,.85); pointer-events: none; z-index: 2; }
.cam-bar { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; color: #fff; font-size: .9rem; }
.cam-status { flex: 1; font-weight: 600; min-height: 1.3rem; line-height: 1.2; }
.cam-ok { color: #7ee08a; } .cam-err { color: #ff8d8d; }
.cam-sum { white-space: nowrap; }
.kalem-table td, .kalem-table th { vertical-align: middle; }
.kalem-table .paket-input { width: 4.5rem; text-align: center; }
.kalem-table .fiyat-input { width: 6.5rem; text-align: right; }
.kalem-table tr.last-scanned { background: #fff3cd; }
.totals-bar { font-size: 1.15rem; }
.totals-bar b { font-size: 1.4rem; }
.cari-box { position: relative; }
.cari-list { position: absolute; z-index: 20; left: 0; right: 0; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #ced4da; border-top: 0; box-shadow: 0 6px 12px rgba(0,0,0,.15); display: none; }
.cari-list .item { padding: .5rem .8rem; cursor: pointer; border-bottom: 1px solid #f1f1f1; }
.cari-list .item.active, .cari-list .item:hover { background: #e8f1f8; }
.cari-list .item small { color: #6c757d; }
.cari-list .letter { background: #f4f6f9; font-weight: 700; padding: .2rem .8rem; color: #0f3d5e; position: sticky; top: 0; }

/* Etiketler */
.label-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.label-card { border: 1px dashed #999; padding: 8px; text-align: center; break-inside: avoid; background: #fff; }
.label-card .ean13 { width: 100%; max-width: 220px; height: auto; }
.label-card .qr svg { width: 84px; height: 84px; }
.label-card .l-title { font-weight: 700; font-size: .85rem; line-height: 1.15; }
.label-card .l-sub { font-size: .8rem; }

/* Yazdirma */
.print-head, .print-only { display: none; }
.siparis-sheet table th, .siparis-sheet table td { padding: .35rem .5rem; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; font-size: 11pt; }
  .app-side, .app-top, .app-bottom, .more-sheet, .no-print, .alert { display: none !important; }
  .app, .app-main { display: block !important; margin: 0 !important; padding: 0 !important; background: #fff !important; min-height: 0 !important; }
  .app-content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  .print-head { display: flex !important; align-items: center; justify-content: space-between; border-bottom: 2px solid #0f3d5e; padding-bottom: 6px; margin-bottom: 10px; }
  .print-logo { height: 72px; width: auto; }
  .print-title { font-size: 18pt; font-weight: 700; color: #0f3d5e; }
  .print-right { text-align: right; font-size: 10pt; }
  .print-only { display: block !important; }
  table { page-break-inside: auto; } tr { page-break-inside: avoid; }
  .badge { border: 1px solid #333; color: #000 !important; background: #fff !important; }
  .label-grid { gap: 4px; }
  .check-box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid #000; vertical-align: middle; }
}

/* Tiklanabilir satirlar */
tr.row-link { cursor: pointer; }
tr.row-link:active { background: #fff3cd; }

/* Telefon duzeni */
@media (max-width: 575.98px) {
  .content-header h1 { font-size: 1.4rem; }
  .btn, .form-control { min-height: 44px; }
  .btn-sm, .btn-xs { min-height: 36px; }
  .kalem-table .paket-input { width: 3.6rem; min-height: 38px; }
  .kalem-table .fiyat-input { width: 5.2rem; min-height: 38px; }
  .kalem-table .btn { min-height: 38px; min-width: 38px; }
  .kalem-table td, .kalem-table th { padding: .45rem .35rem; font-size: .9rem; }
  #scanInput { font-size: 1.3rem; height: 3.2rem; }
  .label-grid { grid-template-columns: repeat(2, 1fr); }
  .totals-bar { position: sticky; bottom: 0; background: #fff; z-index: 5; box-shadow: 0 -2px 8px rgba(0,0,0,.12); font-size: 1rem; }
  .totals-bar b { font-size: 1.15rem; }
  .login-box { margin-top: 6vh; }
}

.hesap-ozet td { padding: .3rem .5rem; }
.hesap-ozet tr.genel td { font-size: 1.15rem; border-top: 2px solid #000; }
@media print { .hesap-ozet { width: 55%; margin-left: auto; } .col-print-6 { width: 100%; max-width: 100%; flex: 0 0 100%; } }
.genel-card .hesap-table td { padding: .3rem .75rem; font-size: .95rem; vertical-align: middle; }
.genel-card .hesap-table td:last-child { text-align: right; white-space: nowrap; }
.genel-card .hesap-table .isk-input { width: 4.5rem; text-align: right; }
.genel-card .hesap-table tr.genel td { font-size: 1.05rem; background: #f4f6f9; border-top: 2px solid #343a40; }
@media (min-width: 768px) { .genel-card { max-width: 460px; margin-left: auto; } }

/* Tiklanabilir satirlar: metin secilmesin */
tr.row-link, tr.row-link td { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(243,156,18,.25); }

/* Kompakt filtre */
.filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .4rem .75rem; }
.filter-form .f-lbl { display: flex; flex-direction: column; margin: 0; font-size: .75rem; font-weight: 600; color: #6c757d; }
.filter-form .f-lbl .form-control { min-width: 9.5rem; font-weight: 400; }
.filter-form .f-wide .form-control { min-width: 13rem; }
.filter-form .f-btns { white-space: nowrap; }
.list-summary { font-size: .95rem; }

/* Tablolar: masaustunde tek satir, ad sutunu genis */
table.tbl-cards th, table.tbl-cards td { white-space: nowrap; }
table.tbl-cards td.col-wrap { white-space: normal; min-width: 13rem; }

/* Telefon: tablo -> kart */
@media screen and (max-width: 767.98px) {
  .filter-form { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-form .f-wide, .filter-form .f-btns { grid-column: 1 / -1; }
  .filter-form .f-lbl .form-control { min-width: 0; min-height: 38px; }
  .table-responsive:has(> table.tbl-cards) { overflow: visible; }
  table.tbl-cards, table.tbl-cards tbody { display: block; width: 100%; }
  table.tbl-cards thead { display: none; }
  table.tbl-cards tbody { padding: .5rem; }
  table.tbl-cards tr { display: block; background: #fff; border: 1px solid #dee2e6; border-radius: 8px; margin-bottom: .5rem; padding: .4rem .7rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
  table.tbl-cards.table-striped tbody tr:nth-of-type(odd) { background: #fff; }
  table.tbl-cards td { display: flex; justify-content: space-between; align-items: center; gap: .75rem; width: auto !important; padding: .2rem 0 !important; border: 0 !important; text-align: right; font-size: .92rem; white-space: normal; min-width: 0 !important; }
  table.tbl-cards td::before { content: attr(data-label); flex: 0 0 auto; font-weight: 600; color: #6c757d; text-align: left; }
  table.tbl-cards td.c-head { display: block; text-align: left; font-size: 1rem; padding-bottom: .35rem !important; margin-bottom: .2rem; border-bottom: 1px solid #eee !important; }
  table.tbl-cards td.c-head::before, table.tbl-cards td.c-act::before, table.tbl-cards td:not([data-label])::before { content: none; }
  table.tbl-cards td.c-act { justify-content: flex-end; padding-top: .35rem !important; }
  table.tbl-cards td.c-hide, table.tbl-cards td.c-hide-card { display: none !important; }
  table.tbl-cards td.col-wrap { min-width: 0; }
  table.tbl-cards tr.empty-row td { display: block; text-align: center; }
  table.tbl-cards .form-control-sm { max-width: 62%; }
  table.tbl-cards .fiyat-input { width: 7rem; max-width: none; }
}
