:root {
  --primary: #1e293b;
  --accent: #d90000;
  --bg: #e2e8f0;
  --paper: #ffffff;
  --tb-height: 30px;
}

/* SABİT TOOLBAR */
.admin-toolbar {
  position: fixed;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  background: #fff;
  padding: 15px;
  border-radius: 6px 0px 0px 6px;
  box-shadow: 0 -1px 14px rgb(0 0 0 / 22%);
  border-left: 4px solid var(--accent);
  backdrop-filter: blur(5px);
}

.toolbar-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: -5px;
  margin-left: 2px;
}

.contract-select {
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: 0.3s;
  color: #1e293b;
}

.contract-select:hover {
  border-color: var(--accent);
}

.btn {
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  color: white;
  transition: 0.3s;
  border: solid 1px transparent;
}
.btn-print {
  background: var(--accent);
}
.btn-save {
  background: #10b981;
}
.btn-reset {
  background: #64748b;
}

.btn:hover {
  color: #000;
  background-color: var(--bs-btn-hover-bg);
  border-color: #666;
}

/* BELGE YAPISI */
.document-wrapper {
  display: flex;
  justify-content: center;
  padding-top: calc(var(--tb-height) + 30px);
  padding-bottom: 50px;
}

.paper {
  background: var(--paper);
  width: 210mm;
  min-height: 297mm;
  padding: 15mm;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-top: 6px solid var(--accent);
  color: #000;
  line-height: 1.4;
}

header h1 {
  text-align: center;
  font-size: 14pt;
  margin: 0 0 15px;
  font-weight: 700;
  text-transform: uppercase;
}
.sig-row-main {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
  font-weight: bold;
  font-size: 8.5pt;
}
.section-label {
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  display: block;
  margin: 12px 0 8px;
  border-left: 5px solid var(--accent);
  font-weight: 700;
  font-size: 10pt;
  text-transform: uppercase;
}

.fixed-input {
  width: 100%;
  border: solid 1px #dedede;
}

/* FORM ELEMENTLERİ */
.form-line {
  flex-wrap: wrap;
  display: flex;
  align-items: baseline;
  margin-bottom: 5px;
  gap: 8px;
  font-size: 9pt;
}
.form-line label {
  font-weight: 700;
  min-width: 100px;
  text-align: left;
}
.form-input {
  flex: 1;
  border: none;
  border-bottom: 1px dotted #000;
  font-weight: 700;
  font-family: inherit;
  background: transparent;
}

.party-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 10px;
}
.party-card {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  background: #fafafa;
}
.party-card h3 {
  font-size: 10pt;
  margin: 0 0 8px;
  color: var(--accent);
  border-bottom: 1px solid #eee;
}

.party-card h3 span {
  display: block;
  font-weight: 800;
}

.prop-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}
.prop-table td {
  border: 1px solid #ccc;
  padding: 6px;
  font-size: 9pt;
}
.bg-f {
  background: #f1f5f9;
  font-weight: 700;
  width: 120px;
}

.legal-text {
  font-size: 9pt;
  text-align: justify;
  margin: 6px 0;
}

.form-input-fixed {
  border: none;
  border-bottom: 1px dotted #000;
  font-weight: 700;
  font-family: inherit;
  background: transparent;
}

.dynamic-input {
  border: none;
  border-bottom: 1px solid #f97316;
  background: #fffbeb;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
}

.dynamic-input2 {
  border: none;
  border-bottom: 1px solid #f97316;
  background: #fffbeb;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
}

/* İMZA */
.sig-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 25px;
  text-align: center;
}
.sig-row2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 25px;
  text-align: center;
}

.sig-box {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sig-label {
  font-weight: 700;
  text-decoration: underline;
  color: var(--accent);
}
.sig-line {
  border-top: 1px solid #000;
  padding-top: 5px;
  font-size: 8pt;
  font-weight: 700;
}

@media print {
  .admin-toolbar {
    display: none;
  }
  @page {
    size: A4;
    margin: 0;
  }
}

.bg-f {
  background: #f1f5f9 !important;
  font-weight: bold;
  width: 20%;
}

.legal-text {
  margin-bottom: 12px;
  line-height: 1.5;
}

.signature-row-inline {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  font-weight: bold;
  font-size: 9pt;
}

.sig-area {
  border-bottom: 1px solid #000;
  width: 200px;
  display: inline-block;
}

/* --- HERO HEADER (KURUMSAL KIRMIZI TEMA) --- */
.hero-section {
  /* Mavi yerine KÄ±rmÄ±zÄ± Gradient */
  background: linear-gradient(135deg, #8a0000 0%, #d90000 100%);
  color: white;
  padding: 70px 20px 130px 20px; /* Alttan boÅŸluk kartlarÄ±n binmesi iÃ§in */
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(217, 0, 0, 0.2);
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 15px 0;
}

.hero-subtitle {
  font-size: 16px;
  opacity: 0.95;
  font-weight: 300;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Dekoratif Arka Plan Daireleri */
.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); /* Daha soft gÃ¶rÃ¼nÃ¼m */
  pointer-events: none;
}
.circle-1 {
  width: 350px;
  height: 350px;
  top: -120px;
  left: -100px;
}
.circle-2 {
  width: 250px;
  height: 250px;
  bottom: 30px;
  right: 8%;
}

/* --- MENÃœ KARTLARI (KIRMIZI EFEKTLÄ°) --- */
.menu-container {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: -80px;
  padding: 0 0px;
  position: relative;
  z-index: 10;
  margin-bottom: 100px;
}

.feature-card {
  background: white;
  width: 311px;
  padding: 14px 24px;
  border-radius: 5px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-bottom: 5px solid transparent;
  display: flex;
  align-items: center;
  gap: 15px;
}

.feature-card:hover {
  transform: translateY(-5px);
  /* GÃ¶lge rengi kÄ±rmÄ±zÄ±msÄ± yapÄ±ldÄ± */
  box-shadow: 0 25px 50px rgba(217, 0, 0, 0.15);
  border-bottom-color: #d90000;
}

.card-icon {
  font-size: 27px;
  color: #d90000;
  margin-bottom: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #fff0f0;
  border-radius: 50%;
  transition: transform 0.4s;
}

.feature-card:hover .card-icon {
  transform: rotateY(180deg);
  background: #d90000;
  color: white;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0px;
}

.card-desc {
  font-size: 14px;
  color: #7f8c8d;
  line-height: 1.6;
}

/* --- FOOTER --- */
.page-footer {
  margin-top: auto;
  text-align: center;
  padding: 40px 20px;
  color: #95a5a6;
  font-size: 13px;
}
.page-footer strong {
  color: #34495e;
}

/* --- MATBU SENET TASARIMI (Responsive & Wrap AyarlÄ±) --- */

/* Senet Ana Ã‡erÃ§eve */
.bono-container {
  display: flex;
  border: 1px solid #aaa;
  /* Hafif noktalÄ± zemin deseni (resmi evrak havasÄ± iÃ§in) */
  background-image: linear-gradient(#f9f9f9 1px, transparent 1px),
    linear-gradient(90deg, #f9f9f9 1px, transparent 1px);
  background-size: 20px 20px;
  margin-bottom: 30px;
  font-family: "Times New Roman", serif; /* Senetlerde genelde serif font kullanÄ±lÄ±r */
  page-break-inside: avoid; /* Bir senedin sayfada bÃ¶lÃ¼nmesini engeller */
  color: #4a3b32;
}

/* --- SOL TARAFTAKÄ° KOÃ‡AN KISMI --- */
.bono-stub {
  width: 15%;
  border-right: 2px dotted #4a3b32; /* Koparma Ã§izgisi efekti */
  padding: 10px 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 9pt;
}

.bs-row {
  margin-bottom: 5px;
}
.bs-row span:first-child {
  font-style: italic;
  display: block;
  font-size: 8pt;
  margin-bottom: 2px;
}
.bs-row span:last-child {
  border-bottom: 1px solid #aaa;
  display: block;
  min-height: 16px;
  font-weight: bold;
  padding-left: 2px;
  word-break: break-all; /* KoÃ§anda uzun isim taÅŸarsa alt satÄ±ra kÄ±rar */
}
.bs-spacer {
  height: 15px;
}

/* --- SAÄ TARAFTAKÄ° ANA KISIM --- */
.bono-main {
  width: 85%;
  padding: 15px;
  position: relative;
}

/* Ãœst Kutular (Tutar, Vade vb.) */
.bm-top {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 15px;
  padding-left: 30px;
}
.bm-box {
  text-align: center;
}
.bm-label {
  font-size: 9pt;
  font-weight: bold;
  color: #5a4a42;
  border-bottom: 2px solid #5a4a42;
  display: inline-block;
  padding: 0 5px 2px 5px;
  margin-bottom: 3px;
}
.bm-val {
  font-size: 12pt;
  font-weight: bold;
  color: #006400;
  border-bottom: 1px solid #aaa;
  min-width: 90px;
  height: 20px;
}
.bm-box-no {
  text-align: center;
}
.bm-val-no {
  font-size: 14pt;
  font-weight: bold;
  color: #006400;
}

/* Orta Metin KÄ±smÄ± */
.bm-text {
  font-size: 10.5pt;
  line-height:1.2;
  text-align: justify;
  margin-bottom: 10px;
  padding-left: 30px;
}
.bm-text p{
  font-size: 10.5pt;
  line-height:1.2;
}
.fill-in {
  color: #006400;
  font-weight: bold;
  line-height:1.2;
  padding: 0 5px;
  text-decoration: underline;
}

/* --- ALT BÄ°LGÄ° ALANI (Sorunlu kÄ±sÄ±m burasÄ±ydÄ±) --- */
.bm-footer {
  display: flex;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

/* Dikey "Ã–DEYECEK" YazÄ±sÄ± */
.bm-vertical {
  width: 30px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-weight: bold;
  letter-spacing: 2px;
  border-right: 2px double #4a3b32;
  padding-left: 5px;
  font-size: 9pt;
}

/* BorÃ§lu Bilgileri Konteyneri */
.bm-info {
  flex-grow: 1;
  padding-left: 10px;
  font-size: 10pt;
  min-width: 0; /* KRÄ°TÄ°K AYAR: Flex Ã§ocuÄŸunun taÅŸmasÄ±nÄ± engeller */
}

/* Bilgi SatÄ±rlarÄ± */
.bm-line {
  display: flex;
  margin-bottom: 2px;
  align-items: flex-start; /* flex-end yerine flex-start: Adres uzarsa baÅŸlÄ±k yukarÄ±da kalsÄ±n */
}

/* Etiketler (Ä°sim, Adres vb.) */
.bm-line .lbl {
  width: 140px;
  font-weight: bold;
  font-size: 9pt;
  flex-shrink: 0; /* Etiket asla daralmasÄ±n */
  padding-top: 3px; /* Hizalama ayarÄ± */
}

/* Veri AlanlarÄ± (Dinamik KÄ±sÄ±mlar) */
.bm-line .data {
  flex-grow: 1;
  border-bottom: 1px dotted #000;
  font-weight: bold;
  color: #006400;
  padding-left: 5px;
  /* Uzun metin ayarlarÄ± */
  white-space: pre-wrap; /* SatÄ±rlarÄ± korur ama sarmalar */
  word-wrap: break-word; /* Uzun kelimeleri bÃ¶ler */
  line-height: 1.2;
}

/* Ä°mza AlanÄ± */
.bm-sig {
  width: 200px;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0; /* Adres alanÄ± imza alanÄ±nÄ± sÄ±kÄ±ÅŸtÄ±rmasÄ±n */
}

/**/

.sirket-logogolari {
  display: flex; /* Logoları yan yana dizer */
  flex-wrap: wrap; /* Alan daralırsa alt satıra geçer */
  align-items: center; /* Farklı yükseklikteki logoları dikeyde ortalar */
  justify-content: center; /* Logoları yatayda ortalar (1 tane olsa da ortada durur) */
  gap: 20px; /* Logolar arasındaki boşluk */
  width: 100%; /* Bulunduğu kabın genişliğini kaplar */
  padding: 0px;
  margin-bottom: 30px;
}

.sirket-logogolari img {
  /* Genişlik ve yüksekliği otomatik ama sınırlı tutar */
  max-width: 150px; /* Maksimum genişlik (isteğinize göre değiştirin) */
  max-height: 80px; /* Maksimum yükseklik (isteğinize göre değiştirin) */

  width: auto; /* Oranları korur */
  height: auto; /* Oranları korur */

  object-fit: contain; /* Logonun kesilmesini veya uzamasını engeller, kutuya sığdırır */

  /* İsteğe bağlı: Logoların mobilde çok küçük kalmaması için */
  min-width: 50px;
}
/* --- MODAL TASARIMI --- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(33, 37, 41, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  background: #ffffff;
  border-radius: 10px;
  width: 800px;
  max-width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 15px 25px;
  border-bottom: 1px solid #f1f3f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 10px 10px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-btn {
  font-size: 20px;
  color: #adb5bd;
  cursor: pointer;
  transition: 0.2s;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8f9fa;
}

.close-btn:hover {
  background: #ffe3e3;
  color: #e03131;
}

.modal-body {
  padding: 25px;
  background: #fff;
}

/* FORM GRIDS */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.full-width {
  grid-column: span 2;
}

.financial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  grid-column: span 2;
}

.section-header {
  grid-column: span 2;
  margin-top: 0px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #d90000;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f3f5;
  padding-bottom: 10px;
}

.section-header i {
  font-size: 16px;
}

.form-control[readonly] {
  background-color: #e9ecef;
  opacity: 1;
  font-weight: bold;
  color: #333;
}

.modal-footer {
  padding: 15px 25px;
  background: #f8f9fa;
  border-top: 1px solid #f1f3f5;
  text-align: right;
  border-radius: 0 0 10px 10px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: white;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-cancel {
  background: #6c757d;
  color: white;
}

.btn-cancel:hover {
  background: #5a6268;
  color: #fff;
}

.printable-container {
  display: none;
}

/* MOBÄ°L RESPONSIVE */
@media (max-width: 600px) {
  .financial-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-width,
  .financial-grid {
    grid-column: span 1;
  }
}
