:root{--soft:#f6f8fb;--line:#e9edf3;--brand:#0f766e;--brand2:#0d9488}.body-bg{background:var(--soft)}.navbar-brand{font-weight:700;letter-spacing:.2px}.card{border:1px solid var(--line);box-shadow:0 4px 18px rgba(15,23,42,.04);border-radius:14px}.card-header{background:#fff;border-bottom:1px solid var(--line);font-weight:700;border-radius:14px 14px 0 0!important}.btn{border-radius:9px}.btn-success,.btn-primary{box-shadow:0 6px 14px rgba(13,148,136,.14)}.page-title{font-size:1.35rem;font-weight:800}.small-muted{font-size:.82rem;color:#64748b}.selection-panel{max-height:430px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:.75rem;background:#fff}.selection-item{padding:.45rem .5rem;border-radius:8px;margin-bottom:.15rem}.selection-item:hover{background:#f1f5f9}.summary-chip{display:inline-flex;gap:.35rem;align-items:center;background:#ecfeff;border:1px solid #cffafe;color:#155e75;border-radius:999px;padding:.25rem .55rem;margin:.15rem;font-size:.82rem}.stat-card{padding:1rem}.stat-number{font-size:1.8rem;font-weight:800}.table th{font-size:.78rem;text-transform:uppercase;color:#64748b}.ck-editor__editable{min-height:260px}.mail-editor textarea{min-height:230px}.sticky-actions{position:sticky;bottom:0;background:rgba(255,255,255,.95);border-top:1px solid var(--line);padding:1rem;z-index:5}.modal-xl{--bs-modal-width:1120px}.login-box{max-width:430px;margin:8vh auto}.nav-link.active{font-weight:700}.badge-soft{background:#eef2ff;color:#3730a3}.file-row{border:1px solid var(--line);border-radius:10px;padding:.55rem .75rem;margin-bottom:.35rem;background:#fff}.preview-box{max-height:460px;overflow:auto}.form-text-info{font-size:.82rem;color:#64748b}.required:after{content:' *';color:#dc2626}.top-alert{border-left:4px solid var(--brand2)}
.preview-light,
.signature-preview {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  min-height: 88px;
}
.debt-list {
  max-height: 680px;
  overflow: auto;
}
.debt-list .active .small,
.debt-list .active strong,
.debt-list .active span {
  color: #fff !important;
}
.template-code {
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: .86rem;
  min-height: 330px;
  background: #0f172a;
  color: #e2e8f0;
}
.mail-live-preview {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  min-height: 180px;
  max-height: 540px;
  overflow: auto;
}
.mail-live-preview > * {
  max-width: 100%;
}

.mail-detail-frame {
  width: 100%;
  min-height: 760px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
input.gsm-mask:invalid {
  border-color: #dc3545;
}

.mail-detail-card {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.mail-detail-card .card-body {
  background: #f1f5f9;
}
.mail-detail-frame-large {
  display: block;
  width: 100%;
  min-height: 620px;
  height: 66vh;
  max-height: 760px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
.mail-attachments-card {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.mail-attachments-card .card-body {
  padding: .85rem;
}
#emailPreviewFrame:fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border: 0;
  border-radius: 0;
}
@media (max-width: 768px) {
  .mail-detail-card,
  .mail-attachments-card {
    max-width: 100%;
  }
  .mail-detail-frame-large {
    min-height: 620px;
    height: 78vh;
    max-height: none;
  }
}
@media print {
  nav, .btn, .badge, .file-row a { display: none !important; }
  main.container, main.container-fluid { padding: 0 !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  .card-body { padding: 0 !important; }
  .mail-detail-frame-large {
    height: 1200px;
    border: 0;
  }
}

/* v29: Menü sayısı arttığı için üst menü gruplandırıldı ve daha kompakt hale getirildi. */
.admin-navbar .navbar-brand {
  white-space: nowrap;
}
.admin-navbar-menu .nav-link {
  padding-left: .62rem;
  padding-right: .62rem;
  white-space: nowrap;
}
.admin-navbar .dropdown-menu {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(15,23,42,.14);
  padding: .45rem;
}
.admin-navbar .dropdown-item {
  border-radius: 8px;
  padding: .55rem .75rem;
}
.admin-navbar .dropdown-item.active,
.admin-navbar .dropdown-item:active {
  background: #0d9488;
}
@media (min-width: 1200px) {
  .admin-navbar .navbar-brand {
    margin-right: 1.25rem;
  }
}
@media (max-width: 1199.98px) {
  .admin-navbar .navbar-collapse {
    padding-top: .75rem;
  }
  .admin-user-box {
    border-top: 1px solid rgba(255,255,255,.18);
    padding-top: .75rem;
    margin-top: .5rem;
  }
}

/* v34: İmza işlem butonları aynı yükseklik/genişlikte görünür. */
.signature-actions .signature-action {
  min-width: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* v41: Admin/dernek menülerinde küçük, şeffaf PNG logo. Menü satırı yüksekliğini bozmaz. */
.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  line-height: 1.15;
}
.portal-brand span {
  white-space: nowrap;
}
.portal-nav-logo {
  height: 24px;
  width: auto;
  max-width: 74px;
  object-fit: contain;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  flex: 0 0 auto;
}
.login-brand-small {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .75rem;
  text-align: left;
}
.login-logo {
  width: 88px;
  max-width: 88px;
  max-height: 56px;
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  flex: 0 0 auto;
}
@media (max-width: 576px) {
  .portal-nav-logo {
    height: 22px;
    max-width: 68px;
  }
  .portal-brand span {
    font-size: .95rem;
  }
  .login-logo {
    width: 76px;
    max-width: 76px;
  }
}


/* v44: Alt bölümdeki logo 100px olacak şekilde küçültüldü. Üst menü logosu v41 düzenindeki gibi küçük kalır. */
.portal-page-footer {
  padding: 1.25rem 0 1.75rem;
  margin-top: .5rem;
}
.portal-footer-logo {
  width: 100px;
  max-width: 30vw;
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  opacity: .96;
}
.login-footer-logo {
  text-align: center;
  margin-top: 1rem;
}
.login-footer-logo img {
  width: 100px;
  max-width: 40%;
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  opacity: .96;
}
@media (max-width: 576px) {
  .portal-footer-logo,
  .login-footer-logo img {
    width: 100px;
    max-width: 42vw;
  }
}

/* v48: Borç takip sayfası, tahakkuk/tahsilat listeleri yan yana değil alt alta ve daha okunabilir. */
.debt-record-card .table-responsive {
  overflow-x: auto;
}
.debt-table th,
.debt-table td {
  vertical-align: middle;
}
.debt-table td:first-child {
  min-width: 260px;
  white-space: normal;
}
@media (min-width: 992px) {
  .debt-record-card .table-responsive {
    overflow-x: visible;
  }
}

/* v57: Borç takip ana tablo sadeleştirme ve tahsilat satırları. */
.debt-main-table th,
.debt-main-table td {
  vertical-align: top;
}
.debt-payment-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 240px;
}
.debt-payment-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  padding: .45rem .55rem;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  background: #f8fafc;
}
.debt-main-table .btn-group-sm .btn {
  padding: .2rem .45rem;
}
@media (max-width: 1199.98px) {
  .debt-main-table td:first-child {
    min-width: 220px;
  }
}

/* v59: Borç takip ana tablo sadeleştirme */
.debt-card-header .debt-card-actions {
  width: 100%;
  padding-top: .45rem;
}
.debt-main-table .debt-year-cell {
  min-width: 120px;
}
@media (max-width: 992px) {
  .debt-card-header .debt-card-actions {
    justify-content: flex-start !important;
  }
}

/* v65: e-posta türü seçenekleri yan yana, çerçeveli ve kompakt */
.mail-type-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: .6rem;
  width: 100%;
}
.mail-type-option {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: .65rem .75rem;
  border: 1px solid #dbe3ef;
  border-radius: .65rem;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.mail-type-option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.mail-type-option:hover {
  border-color: #0d9488;
  background: #f8fffd;
}
.mail-type-option .form-check-input {
  flex: 0 0 auto;
  margin-top: .2rem;
}
.mail-type-option .fw-semibold {
  font-size: .95rem;
  line-height: 1.15;
}
.mail-type-option .small-muted {
  font-size: .78rem;
  line-height: 1.25;
}
@media (max-width: 480px) {
  .mail-type-grid { flex-direction: column; }
}
