/* ==========================================================
   TEKNOMAĞAZA — BELGE MODAL + BELGE İÇERİĞİ
   Fatura / Garanti / Sözleşme / Senet görüntüleme
   ========================================================== */

/* MODAL BASE */
.belge-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: none;
}
.belge-modal.open { display: block; }

.belge-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(14,17,22,.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.belge-modal-content {
  position: relative;
  max-width: 920px;
  max-height: calc(100vh - 60px);
  margin: 30px auto;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(14,17,22,.4);
}

.belge-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #E4E6EA;
  flex-shrink: 0;
}
.belge-modal-head > div:first-child strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0E1116;
  margin: 0;
}
.belge-modal-head > div:first-child span {
  display: block;
  font-size: 11.5px;
  color: #5E6673;
  margin-top: 2px;
}
.belge-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.belge-modal-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: .15s;
}
.belge-modal-actions .btn-outline {
  background: #fff;
  border: 1.5px solid #E4E6EA;
  color: #0E1116;
}
.belge-modal-actions .btn-outline:hover {
  border-color: #0E1116;
}
.belge-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #E4E6EA;
  background: #fff;
  color: #5E6673;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .15s;
  font-family: inherit;
}
.belge-modal-close:hover {
  background: #A51218;
  color: #fff;
  border-color: #A51218;
  transform: rotate(90deg);
}

.belge-modal-body {
  flex: 1;
  overflow-y: auto;
  background: #F4F5F7;
  padding: 24px;
}

.belge-loading,
.belge-error {
  padding: 60px 20px;
  text-align: center;
  font-size: 13px;
  color: #5E6673;
}
.belge-error { color: #A51218; font-weight: 700; }

/* BELGE İÇERİĞİ */
.belge-modal-body .belge {
  background: #fff;
  padding: 32px 36px;
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(14,17,22,.06);
  max-width: 820px;
  margin: 0 auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: #1A1E25;
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.belge-modal-body .belge-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 3px solid #A51218;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.belge-modal-body .belge-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #0E1116;
}
.belge-modal-body .belge-title {
  font-size: 16px;
  font-weight: 800;
  color: #A51218;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.belge-modal-body .belge-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 14px;
  background: #F6F7F9;
  border-radius: 5px;
  margin-bottom: 16px;
  font-size: 11.5px;
}
.belge-modal-body .belge-info strong { color: #0E1116; font-weight: 800; }

.belge-modal-body .belge-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 11.5px;
  line-height: 1.65;
}
.belge-modal-body .belge-meta > div {
  padding: 12px 14px;
  border: 1px solid #E4E6EA;
  border-radius: 5px;
  background: #fff;
}
.belge-modal-body .belge-meta strong {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #A51218;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.belge-modal-body .belge-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin: 10px 0 14px;
}
.belge-modal-body .belge-table th {
  background: #F6F7F9;
  text-align: left;
  padding: 9px 11px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #5E6673;
  border-bottom: 1px solid #E4E6EA;
}
.belge-modal-body .belge-table td {
  padding: 9px 11px;
  border-bottom: 1px solid #EFF1F4;
  vertical-align: top;
}
.belge-modal-body .belge-table tr:last-child td { border-bottom: none; }
.belge-modal-body .belge-table .r { text-align: right; }

.belge-modal-body .belge-totals {
  margin-left: auto;
  max-width: 300px;
  margin-bottom: 18px;
}
.belge-modal-body .belge-totals > div {
  display: flex;
  justify-content: space-between;
  padding: 7px 11px;
  font-size: 12px;
  border-bottom: 1px dashed #EFF1F4;
}
.belge-modal-body .belge-totals > div span { color: #5E6673; }
.belge-modal-body .belge-totals > div strong { color: #0E1116; font-weight: 800; }
.belge-modal-body .belge-totals-grand {
  background: #A51218 !important;
  color: #fff !important;
  border-radius: 5px;
  margin-top: 6px;
  padding: 11px !important;
  border-bottom: none !important;
}
.belge-modal-body .belge-totals-grand span,
.belge-modal-body .belge-totals-grand strong {
  color: #fff !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
}

.belge-modal-body .belge-notes {
  padding: 14px 16px;
  background: #F6F7F9;
  border-left: 3px solid #A51218;
  border-radius: 0 5px 5px 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: #1A1E25;
  margin-bottom: 14px;
}
.belge-modal-body .belge-notes h4 {
  font-size: 12px;
  font-weight: 800;
  color: #0E1116;
  margin: 12px 0 6px;
}
.belge-modal-body .belge-notes h4:first-child { margin-top: 0; }
.belge-modal-body .belge-notes p { margin: 0 0 8px; }
.belge-modal-body .belge-notes ul { margin: 0 0 8px; padding-left: 18px; }
.belge-modal-body .belge-notes li { margin-bottom: 3px; }

.belge-modal-body .belge-senet-text {
  font-size: 12px;
  line-height: 1.75;
  margin-bottom: 18px;
}
.belge-modal-body .belge-senet-text p { margin-bottom: 8px; }
.belge-modal-body .belge-senet-plan h4 {
  font-size: 12.5px;
  font-weight: 800;
  color: #0E1116;
  margin: 14px 0 8px;
}

.belge-modal-body .belge-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #E4E6EA;
}
.belge-modal-body .belge-sign-item {
  font-size: 11.5px;
  text-align: center;
  line-height: 1.6;
}
.belge-modal-body .belge-sign-item strong {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: #A51218;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.belge-modal-body .sign-line {
  display: block;
  width: 100%;
  height: 60px;
  border-bottom: 1px solid #0E1116;
  margin-top: 6px;
}
.belge-modal-body .sign-image {
  max-height: 70px;
  max-width: 100%;
  margin: 8px auto 0;
  display: block;
}

.belge-modal-body .belge-foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed #E4E6EA;
  font-size: 10.5px;
  color: #8D95A1;
  text-align: center;
  font-style: italic;
}

/* MOBİL */
@media (max-width: 720px) {
  .belge-modal-content {
    margin: 10px;
    max-height: calc(100vh - 20px);
    border-radius: 5px;
  }
  .belge-modal-body { padding: 14px; }
  .belge-modal-body .belge { padding: 20px 18px; }
  .belge-modal-body .belge-meta { grid-template-columns: 1fr; }
  .belge-modal-body .belge-sign { grid-template-columns: 1fr; gap: 24px; }
  .belge-modal-body .belge-head { flex-direction: column; align-items: flex-start; }
  .belge-modal-actions .btn { padding: 7px 10px; font-size: 10.5px; }
}