html {
  font-size: 14px;
}

/* Truncate long text inside table cells to keep row height consistent */
table.table td.truncate {
  max-width: 280px; /* adjust as needed */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ensure inner block elements inside td also truncate */
table.table td.truncate > * {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ensure danger buttons have readable text */
.btn-danger, .btn-outline-danger {
  color: #fff !important;
}

/* Make buttons filled (no outline) and text white */
.btn {
  color: #fff !important;
}

/* Primary filled */
.btn-primary {
  background-color: hsl(var(--button-h), var(--button-s), var(--button-l)) !important;
  border-color: hsl(var(--button-h), var(--button-s), var(--button-l)) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 6%)) !important;
  border-color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 6%)) !important;
}

/* Secondary filled (neutral) */
.btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
  background-color: #565e64 !important;
  border-color: #565e64 !important;
}

/* Danger filled */
.btn-danger {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}
.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
  background-color: #c82333 !important;
  border-color: #c82333 !important;
}

/* Convert outline variants to filled appearance to match requested style */
.btn-outline-primary, .btn-outline-secondary, .btn-outline-danger {
  color: #fff !important;
  background-color: transparent;
}
.btn-outline-primary {
  background-color: hsl(var(--button-h), var(--button-s), var(--button-l)) !important;
  border-color: hsl(var(--button-h), var(--button-s), var(--button-l)) !important;
}
.btn-outline-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
}
.btn-outline-danger {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  /* Sayfa / panel / tablo marka rengi */
  --primary-color: #508ca8;
  --primary-rgb: 80, 140, 168;
  --primary-h: 199;
  --primary-s: 35%;
  --primary-l: 49%;
  /* Buton rengi — koyu mavi */
  --button-color: #08558d;
  --button-rgb: 8, 85, 141;
  --button-h: 205;
  --button-s: 89%;
  --button-l: 29%;
  /* Navbar — buton rengi ile aynı */
  --navbar-color: var(--button-color);
  --navbar-rgb: var(--button-rgb);
  --navbar-h: var(--button-h);
  --navbar-s: var(--button-s);
  --navbar-l: var(--button-l);
}

/* Primary button */
.btn-primary {
  background-color: var(--button-color);
  border-color: var(--button-color);
}

.btn-primary:hover {
  background-color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 5%));
  border-color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 5%));
}

/* Navbar brand / links */
.navbar {
  background-color: var(--navbar-color) !important;
}
.navbar .nav-link, .navbar .navbar-brand {
  color: #fff !important;
}

/* Navbar brand image sizing */
.navbar-brand img {
  height: 34px;
  width: auto;
  display: block;
}

/* Make navbar links show a subtle boundary and underline on hover/focus */
.navbar .nav-link {
  position: relative;
  padding: 0.45rem 0.65rem;
  border-radius: 0.25rem;
  transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background-color: rgba(var(--navbar-rgb), 0.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
  color: #fff !important;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 2px;
  background: rgba(255,255,255,0.95);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
  border-radius: 2px;
}
.navbar .nav-link:hover::after,
.navbar .nav-link:focus::after {
  transform: scaleX(1);
}

/* Table header accent */
.table thead th {
  background-color: rgba(var(--primary-rgb), 0.06);
  border-bottom: 2px solid hsl(var(--primary-h), var(--primary-s), var(--primary-l));
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
}

.form-control:focus {
  box-shadow: 0 0 0 0.15rem rgba(var(--primary-rgb),0.25);
  border-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Login page */
body.login-page {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg,
    hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 4%)) 0%,
    hsl(var(--primary-h), var(--primary-s), var(--primary-l)) 45%,
    hsl(var(--primary-h), 70%, 14%) 100%);
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.login-card-header {
  padding: 2rem 2rem 1rem;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.06) 0%, transparent 100%);
}

.login-logo {
  max-height: 72px;
  width: auto;
  margin-bottom: 1rem;
  object-fit: contain;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

.login-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.login-card-body {
  padding: 0 2rem 1.5rem;
}

.login-card-footer {
  padding: 1rem 2rem 1.25rem;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}

.login-website-link {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.75rem !important;
}

.login-website-btn {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.login-website-btn:hover {
  color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 8%));
  text-decoration: underline;
}

.login-btn {
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 0.5rem;
}

.login-form .form-control {
  border-radius: 0.5rem;
  border-color: #dee2e6;
}

.login-form .form-floating > label {
  color: #6c757d;
}

/* Navbar user badge */
.user-badge {
  font-weight: 500;
  font-size: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.user-badge-icon {
  margin-right: 0.25rem;
}

.settings-avatar {
  width: 64px;
  height: 64px;
  line-height: 64px;
  font-size: 1.75rem;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 50%;
  margin-left: auto;
  margin-right: auto;
}

/* Ortak liste sayfası tasarımı */
.erp-list-page {
  max-width: 100%;
}

.erp-page-header {
  margin-bottom: 1.25rem;
}

.erp-page-header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.erp-page-header p {
  color: #495057;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.erp-page-header-with-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.erp-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.erp-panel {
  background: #fff;
  border: 1px solid var(--primary-color);
  border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.18);
  overflow: hidden;
}

.erp-panel + .erp-section-divider,
.erp-section-divider + .erp-panel {
  margin-top: 0;
}

.erp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: var(--button-color);
  border-bottom: 1px solid var(--button-color);
}

.erp-panel-head-title {
  font-weight: 600;
  color: #fff;
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.erp-panel-head-title .erp-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.95rem;
}

.erp-panel-head-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.erp-panel-body {
  padding: 0;
}

.erp-panel-body-padded {
  padding: 1rem 1.15rem;
}

.erp-panel-idle {
  padding: 1.1rem 1.15rem;
  margin: 0;
  color: #495057;
  font-size: 0.88rem;
  background: #fff;
  border-left: 4px solid var(--primary-color);
}

.erp-section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.35rem 0;
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  background-image: linear-gradient(
    180deg,
    transparent 0%,
    var(--primary-color) 18%,
    var(--primary-color) 82%,
    transparent 100%
  );
  background-size: 2px 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.erp-section-divider::before,
.erp-section-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--primary-color);
}

.erp-section-divider span {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--primary-color);
  border-radius: 2rem;
  background: #fff;
  color: var(--primary-color);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.erp-filter-hint {
  padding: 0.65rem 1.15rem;
  font-size: 0.82rem;
  color: #495057;
  background: #fff;
  border-bottom: 1px solid var(--primary-color);
  margin: 0;
}

.erp-inline-filter {
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid var(--primary-color);
  background: #fff;
}

.erp-list-actions {
  padding: 0.85rem 1.15rem;
  background: #fff;
  border-top: 1px solid var(--primary-color);
}

.erp-data-table {
  margin-bottom: 0;
}

.erp-data-table thead tr:first-child th {
  background: var(--button-color);
  border-bottom: 2px solid var(--button-color);
  font-weight: 600;
  color: #fff;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.erp-data-table thead tr:first-child th:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.erp-data-table thead tr:nth-child(2) th {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 0.45rem 0.4rem;
  vertical-align: middle;
}

.erp-data-table thead tr:nth-child(2) th:not(:last-child) {
  border-right: 1px solid #dee2e6;
}

.erp-data-table thead tr:nth-child(2) .form-control,
.erp-data-table thead tr:nth-child(2) .form-select {
  border-color: #ced4da;
  background-color: #fff;
  font-size: 0.82rem;
}

.erp-data-table thead tr:nth-child(2) .form-control:focus,
.erp-data-table thead tr:nth-child(2) .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.column-filter-dropdown {
  position: relative;
  width: 100%;
}

.column-filter-dropdown-btn {
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 12px 10px;
}

.column-filter-dropdown-menu {
  display: none;
  position: fixed;
  z-index: 1060;
  min-width: 11rem;
  max-width: 18rem;
  max-height: 14rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.35rem 0;
}

.column-filter-dropdown-menu.is-open {
  display: block;
}

.column-filter-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
}

.column-filter-dropdown-item:hover {
  background: #f8f9fa;
}

.column-filter-dropdown-item input {
  flex-shrink: 0;
  margin: 0;
}

.erp-data-table tbody td:not(:last-child) {
  border-right: 1px solid #dee2e6;
}

.erp-data-table tbody tr {
  border-bottom: 1px solid #dee2e6;
}

.erp-data-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.erp-data-table tbody tr:hover {
  background-color: #e9ecef;
}

.erp-summary-table thead th,
.erp-summary-table tfoot th {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

.erp-summary-table thead th {
  font-size: 0.85rem;
  font-weight: 600;
}

.erp-summary-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.erp-summary-table tbody tr:hover {
  background-color: #e9ecef;
}

.erp-summary-table thead th:not(:last-child),
.erp-summary-table tbody td:not(:last-child),
.erp-summary-table tfoot th:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.erp-summary-table tbody td:not(:last-child) {
  border-right: 1px solid #dee2e6;
}

.erp-summary-table tfoot th {
  font-weight: 700;
}

/* Panel içi kaydırma — sayfa uzamasını sınırlar */
.erp-scroll-region {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.erp-scroll-region-sm {
  max-height: min(28vh, 280px);
}

.erp-scroll-region-lg {
  max-height: min(58vh, 640px);
}

.erp-scroll-region .erp-data-table thead tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.erp-scroll-region .erp-data-table thead tr:nth-child(2) th {
  position: sticky;
  top: var(--erp-table-head-row1, 2.75rem);
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 #dee2e6;
}

.erp-scroll-region .erp-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.erp-scroll-region .erp-summary-table tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.erp-sub-panel {
  border: 1px solid var(--primary-color);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
  background: #fff;
}

.erp-sub-panel:last-child {
  margin-bottom: 0;
}

.erp-sub-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--button-color);
  color: #fff;
  font-weight: 600;
}

.erp-sub-panel-head-success {
  background: #198754;
}

.erp-sub-panel-head-danger {
  background: #dc3545;
}

.erp-sub-panel-body {
  padding: 0.75rem 1rem;
}

.erp-sub-panel-body .list-group-item {
  border-left: none;
  border-right: none;
}

/* Kayıt / düzenleme formları */
.erp-form-page .erp-panel {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.erp-form-page-wide .erp-panel {
  max-width: 70rem;
}

.erp-form-page-teklif .erp-panel {
  max-width: 100%;
}

.erp-detail-page .erp-form-body > .erp-sub-panel,
.erp-detail-page .erp-form-body > .erp-detail-parcalar-panel,
.erp-detail-page .erp-form-body > .erp-detail-split-row {
  margin-bottom: 1rem;
}

.erp-detail-page .erp-servis-parts-summary-wide,
.erp-detail-page .erp-servis-totals-grid-wide {
  max-width: none;
}

.erp-detail-page .erp-detail-parcalar-panel .erp-data-table th,
.erp-detail-page .erp-detail-parcalar-panel .erp-data-table td {
  white-space: nowrap;
}

.erp-detail-page .erp-detail-parcalar-panel .erp-servis-parca-makine-table td:nth-child(2) {
  white-space: normal;
  min-width: 10rem;
}

.erp-servis-parca-makine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

@media (max-width: 991px) {
  .erp-servis-parca-makine-grid {
    grid-template-columns: 1fr;
  }
}

.erp-servis-parca-makine-card {
  background: #f8fafb;
  border: 1px solid #d5dee8;
  border-radius: 0.5rem;
  overflow: hidden;
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.erp-servis-parca-makine-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #eef4f9 0%, #e6eef6 100%);
  border-bottom: 1px solid #d5dee8;
}

.erp-servis-parca-makine-head-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.erp-servis-parca-makine-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a7189;
}

.erp-servis-parca-makine-title {
  font-size: 0.95rem;
  color: #08558d;
  word-break: break-word;
}

.erp-servis-parca-makine-meta {
  font-size: 0.8rem;
  color: #5a7189;
  white-space: nowrap;
}

.erp-servis-parca-makine-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-top: 1px dashed #d5dee8;
  background: #f3f7fa;
  font-size: 0.85rem;
  color: #4a5d73;
}

.erp-servis-parca-makine-foot strong {
  color: #08558d;
}

.erp-servis-parca-makine-card + .erp-servis-parca-makine-card {
  margin-top: 0;
}

.erp-detail-page .erp-detail-parcalar-panel .erp-servis-parca-makine-table thead th {
  background: #eef4f9;
  border-bottom: 1px solid #d5dee8;
  color: #4a5d73;
  font-weight: 600;
  font-size: 0.82rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.erp-detail-page .erp-detail-parcalar-panel .erp-servis-parca-makine-table thead th:not(:last-child) {
  border-right: 1px solid #d5dee8;
}

.erp-detail-page .erp-sub-panel-body .erp-panel-idle {
  margin: 0.75rem 1rem;
}

.erp-info-list-detail .erp-info-row dt {
  flex: 0 0 8.5rem;
}

.erp-delete-panel .erp-delete-record-actions {
  margin-top: 0.25rem;
}

.erp-delete-modal .modal-content {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
}

.erp-delete-modal .modal-header {
  background: var(--button-color);
  color: #fff;
  border-bottom: none;
  padding: 0.85rem 1rem;
}

.erp-delete-modal .modal-header .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.85;
}

.erp-delete-modal .modal-body {
  padding: 1rem 1.25rem;
}

.erp-delete-modal .modal-footer {
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  padding: 0.75rem 1rem;
}

.erp-delete-modal .modal-footer form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  justify-content: flex-end;
}

.erp-foto-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.erp-foto-card {
  width: 9.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.erp-foto-card-link {
  display: block;
}

.erp-foto-card img {
  width: 100%;
  height: 6.5rem;
  object-fit: cover;
  display: block;
}

.erp-foto-card-caption {
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.erp-form-aside {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 1.15rem 1.25rem;
  min-height: 12rem;
}

.erp-info-list .erp-info-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.875rem;
}

.erp-info-list .erp-info-row:last-child {
  border-bottom: none;
}

.erp-info-list dt {
  flex: 0 0 5.5rem;
  font-weight: 600;
  color: #6c757d;
  margin: 0;
}

.erp-info-list dd {
  flex: 1;
  margin: 0;
  color: #212529;
  word-break: break-word;
}

.erp-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.erp-panel-toolbar-search {
  flex: 1 1 14rem;
  max-width: 22rem;
}

.erp-panel-toolbar-actions {
  flex: 0 0 auto;
}

.erp-list-tabs {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 0;
}

.erp-list-tabs .nav-link {
  color: #495057;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.erp-list-tabs .nav-link.active {
  color: #08558d;
  font-weight: 600;
}

.erp-form-subsection-title {
  color: #08558d;
  font-size: 0.9rem;
}

.erp-machine-parts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 992px) {
  .erp-machine-parts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.erp-machine-parts-card {
  background: #f8fafb;
  border: 1px solid #e2e8ef;
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  min-width: 0;
}

.erp-machine-parts-card .erp-form-subsection-title {
  font-size: 0.85rem;
  line-height: 1.35;
  word-break: break-word;
}

.erp-machine-parts-grid .part-row {
  display: grid;
  grid-template-columns: 1fr 4.5rem 2.25rem;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.erp-machine-parts-grid .part-row > [class*="col-"] {
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0;
}

.erp-machine-parts-grid .part-row .col-md-5 {
  grid-column: 1 / -1;
}

.erp-machine-parts-grid .part-row .col-md-4 {
  grid-column: 1;
}

.erp-machine-parts-grid .part-row .col-md-2 {
  grid-column: 2;
}

.erp-machine-parts-grid .part-row .col-md-1 {
  grid-column: 3;
  text-align: center !important;
}

.erp-machine-parts-grid .machine-parts-block .d-md-flex {
  display: none !important;
}

.erp-machine-parts-total {
  border-top: 1px dashed #d5dee8;
  font-size: 0.85rem;
  color: #4a5d73;
}

.erp-machine-parts-total span {
  font-weight: 600;
  color: #08558d;
}

.erp-machine-parts-grid .part-price-cell {
  grid-column: 1 / -1;
  padding-left: 0.1rem;
}

.erp-form-body .select2-container + .select2-container,
.erp-form-body select.is-invalid + .select2-container .select2-selection {
  border-color: #dc3545 !important;
}

.erp-form-body select.is-invalid {
  border-color: #dc3545;
}

.erp-form-body .validation-summary-valid {
  display: none;
}

.erp-form-body .alert-danger ul {
  margin-bottom: 0;
  padding-left: 1.1rem;
}

.erp-servis-kur-row > [class*="col-"] {
  min-height: 4.5rem;
}

.erp-servis-kur-row .form-label {
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.erp-servis-parts-summary {
  max-width: 32rem;
  margin-bottom: 0.5rem;
}

.erp-servis-parts-summary-table.erp-servis-parts-summary {
  max-width: 40rem;
  width: 100%;
  margin-bottom: 0.75rem;
}

.erp-detail-page .erp-servis-parts-summary-table.erp-servis-parts-summary {
  max-width: none;
}

#servisTotalsContent {
  max-width: 40rem;
}

#servisTotalsContent .erp-servis-totals-grid {
  max-width: none;
  width: 100%;
}

.erp-servis-parts-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.84rem;
}

.erp-servis-iskonto-table {
  table-layout: fixed;
  width: 100%;
}

.erp-servis-parts-table th,
.erp-servis-parts-table td {
  padding: 0.28rem 0.35rem;
  vertical-align: middle;
}

.erp-servis-parts-table th:first-child,
.erp-servis-parts-table td:first-child {
  width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-servis-iskonto-table th:first-child,
.erp-servis-iskonto-table td:first-child {
  width: auto;
}

.erp-servis-iskonto-table .erp-col-parca {
  width: 24%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
  padding-right: 0.5rem;
}

.erp-servis-iskonto-table .erp-col-tutar {
  width: 14%;
  white-space: nowrap;
}

.erp-servis-iskonto-table .erp-col-adet {
  width: 7%;
  text-align: center;
}

.erp-servis-iskonto-table .erp-col-iskonto {
  width: 20%;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.erp-servis-parts-table tbody tr + tr td {
  border-top: 1px dashed #e8edf2;
}

.erp-servis-iskonto-table .erp-iskonto-cell {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

.erp-servis-iskonto-table .summary-iskonto-tipi {
  flex: 0 0 2.85rem;
  width: 2.85rem;
  min-width: 2.85rem;
  padding-left: 0.15rem;
  padding-right: 1.2rem;
  font-size: 0.78rem;
}

.erp-servis-iskonto-table .summary-iskonto-deger {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 100%;
  font-size: 0.78rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

@media (max-width: 575.98px) {
  .erp-servis-parts-summary-table.erp-servis-parts-summary,
  #servisTotalsContent {
    max-width: 100%;
  }

  .erp-servis-parts-summary-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .erp-servis-iskonto-table {
    min-width: 34rem;
  }
}

#machineSelect:disabled {
  background-color: #f1f4f8;
  cursor: not-allowed;
}

.erp-servis-totals-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 32rem;
}

.erp-servis-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
}

.erp-servis-totals-row span {
  color: #4a5d73;
}

.erp-servis-totals-row strong {
  color: #08558d;
  white-space: nowrap;
}

.erp-servis-totals-sub {
  padding-top: 0.35rem;
  border-top: 1px solid #e2e8ef;
}

.erp-servis-totals-grand {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 2px solid #c5d4e3;
  font-size: 1rem;
}

.erp-servis-totals-grand strong {
  font-size: 1.05rem;
}

.erp-servis-istatistik .erp-home-kpi-card {
  cursor: default;
  text-decoration: none;
  color: inherit;
}

.erp-kpi-text {
  font-size: 1rem;
  line-height: 1.35;
  word-break: break-word;
}

.erp-kar-table-panel {
  margin-bottom: 1rem;
}

.erp-kar-table-panel .erp-kar-table-panel-body {
  padding: 0;
}

.erp-kar-table-panel .erp-scroll-region-kar {
  max-height: min(48vh, 480px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.erp-kar-table-panel .erp-data-table {
  margin-bottom: 0;
}

.erp-kar-table-panel .erp-data-table thead tr:first-child th {
  background: #f1f3f5;
  border-bottom: 1px solid #dee2e6;
  color: #000;
  border-right: 1px solid #dee2e6;
}

.erp-kar-table-panel .erp-data-table thead tr:nth-child(2) th {
  color: #000;
}

.erp-kar-table-panel .erp-scroll-region-kar .erp-data-table thead tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.erp-kar-table-panel .erp-scroll-region-kar .erp-data-table thead tr:nth-child(2) th {
  position: sticky;
  top: var(--erp-table-head-row1, 2.75rem);
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 #dee2e6;
}

.erp-kar-table-wrap {
  overflow-x: auto;
}

.erp-kar-servis-table,
.erp-kar-parca-table {
  width: auto;
  max-width: 100%;
  table-layout: auto;
}

.erp-kar-servis-table th,
.erp-kar-servis-table td,
.erp-kar-parca-table th,
.erp-kar-parca-table td {
  vertical-align: middle;
}

.erp-kar-col-id,
.erp-kar-col-tarih,
.erp-kar-col-adet,
.erp-kar-col-tutar,
.erp-kar-col-tip,
.erp-kar-col-islem {
  width: 1%;
  white-space: nowrap;
}

.erp-kar-col-text {
  width: auto;
  max-width: 16rem;
  white-space: normal;
  word-break: break-word;
}

.erp-kar-parca-table thead tr:nth-child(2) th.erp-kar-col-id,
.erp-kar-parca-table thead tr:nth-child(2) th.erp-kar-col-tarih,
.erp-kar-parca-table thead tr:nth-child(2) th.erp-kar-col-adet,
.erp-kar-parca-table thead tr:nth-child(2) th.erp-kar-col-tutar {
  width: 1%;
}

.erp-kar-parca-table thead tr:nth-child(2) th.erp-kar-col-text {
  min-width: 6rem;
  max-width: 14rem;
}

.erp-form-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.erp-form-section {
  margin-bottom: 1.35rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid #e9ecef;
}

.erp-form-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.erp-form-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.85rem;
}

.erp-form-body .form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.3rem;
}

.erp-form-body .form-control,
.erp-form-body .form-select {
  font-size: 0.875rem;
}

.erp-form-body textarea.form-control {
  min-height: 4.5rem;
  resize: vertical;
}

.erp-form-hint {
  font-size: 0.78rem;
  color: #6c757d;
  margin-top: 0.35rem;
}

.erp-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid #e9ecef;
}

.erp-sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.erp-data-table thead tr:first-child th.erp-sortable-th.sort-asc::after,
.erp-data-table thead tr:first-child th.erp-sortable-th.sort-desc::after {
  font-size: 0.65rem;
  opacity: 0.9;
}

.erp-data-table thead tr:first-child th.erp-sortable-th.sort-asc::after {
  content: ' ▲';
}

.erp-data-table thead tr:first-child th.erp-sortable-th.sort-desc::after {
  content: ' ▼';
}

.erp-form-body .select2-container,
.erp-servis-istatistik .select2-container {
  font-size: 0.875rem;
}

.erp-kar-filter-select {
  min-width: 220px;
  flex: 0 1 220px;
}

.erp-kar-date-input {
  width: 150px;
  max-width: 150px;
}

/* Servis liste tablosu: Tarih ve Servis Tipi kolonlarını içerik kadar dar tut */
#servisler_table .erp-servis-col-tarih,
#servisler_table .erp-servis-col-tip {
  width: 1%;
  white-space: nowrap;
}

#servisler_table thead .column-filter-select {
  width: 100%;
  min-width: 0;
}

.erp-form-body .select2-container--default .select2-selection--single,
.erp-servis-istatistik .select2-container--default .select2-selection--single {
  min-height: calc(1.5em + 0.5rem + 2px);
  border-color: #ced4da;
  font-size: 0.875rem;
}

.erp-form-body .select2-container--default .select2-selection--single .select2-selection__rendered,
.erp-servis-istatistik .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: calc(1.5em + 0.5rem);
  padding-left: 0.5rem;
}

.erp-form-body .select2-container--default .select2-selection--single .select2-selection__arrow,
.erp-servis-istatistik .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.5rem);
}

.erp-form-body .select2-container--default.select2-container--focus .select2-selection--single,
.erp-servis-istatistik .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

.erp-form-body .select2-container--default .select2-selection--multiple {
  min-height: calc(1.5em + 0.5rem + 2px);
  border-color: #ced4da;
  border-radius: 0.375rem;
}

.erp-form-body .select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* Ana sayfa dashboard */
.erp-home-page {
  padding-bottom: 0.5rem;
}

.erp-home-hero {
  margin-bottom: 1.25rem;
}

.erp-home-hero-body {
  padding: 1.75rem 1.25rem 1.5rem;
  background: linear-gradient(
    180deg,
    rgba(var(--primary-rgb), 0.08) 0%,
    #fff 100%
  );
}

.erp-home-logo {
  max-height: 72px;
  width: auto;
}

.erp-home-welcome {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--button-color);
  margin-bottom: 0.35rem;
}

.erp-home-tagline {
  max-width: 36rem;
  margin: 0 auto 0.85rem;
  color: #5c6670;
  font-size: 0.92rem;
}

.erp-home-version {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--button-color);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.erp-home-kpi-row {
  margin-bottom: 0.25rem;
}

.erp-home-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 6.5rem;
  padding: 1rem 0.75rem;
  border: 1px solid var(--primary-color);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.14);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.erp-home-kpi-card:hover {
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.24);
  transform: translateY(-2px);
  color: inherit;
}

.erp-home-kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--button-color);
}

.erp-home-kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #495057;
  margin-top: 0.25rem;
}

.erp-home-kpi-sub {
  font-size: 0.72rem;
  color: #6c757d;
  margin-top: 0.15rem;
}

.erp-home-module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--primary-color);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.12);
  padding: 1rem 1.1rem 0.85rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.erp-home-module-card:hover {
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.22);
  transform: translateY(-2px);
}

.erp-home-module-link {
  z-index: 1;
}

.erp-home-module-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.erp-home-module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.35rem;
  border-radius: 0.4rem;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--button-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.erp-home-module-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--button-color);
}

.erp-home-module-desc {
  flex: 1 1 auto;
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: #6c757d;
}

.erp-home-module-footer {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(var(--primary-rgb), 0.15);
}

.erp-home-module-footer-wrap .btn {
  flex: 1 1 auto;
}

.erp-home-panel-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  white-space: nowrap;
}

.erp-home-panel-link:hover {
  text-decoration: underline;
  color: #fff;
}

.erp-home-page .erp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.erp-home-activity-table thead th {
  font-size: 0.78rem;
  color: #495057;
  border-bottom-width: 1px;
}

.erp-home-activity-table tbody td {
  font-size: 0.84rem;
  vertical-align: middle;
}

.erp-home-activity-table tbody tr:nth-child(even) {
  background: rgba(var(--primary-rgb), 0.04);
}

.erp-home-activity-table tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.09);
}

.erp-home-activity-table a {
  color: var(--button-color);
  font-weight: 600;
  text-decoration: none;
}

.erp-home-activity-table a:hover {
  text-decoration: underline;
}

.erp-price-preview {
  padding: 0.65rem 0.85rem;
  border: 1px dashed rgba(var(--primary-rgb), 0.45);
  border-radius: 0.4rem;
  background: rgba(var(--primary-rgb), 0.05);
}

.erp-price-preview-line + .erp-price-preview-line {
  margin-top: 0.25rem;
}

.erp-stok-table .erp-stok-col-seri,
.erp-stok-table .erp-stok-col-depo,
.erp-stok-table .erp-stok-col-miktar,
.erp-stok-table .erp-stok-col-fiyat {
  width: 1%;
  white-space: nowrap;
}

.erp-stok-table .erp-stok-col-miktar {
  text-align: center;
}

.erp-stok-table .erp-stok-col-fiyat {
  font-size: 0.88rem;
}

#urunler_table .erp-urun-col-seri,
#urunler_table .erp-urun-col-fiyat {
  width: 1%;
  white-space: nowrap;
}

#urunler_table .erp-urun-col-fiyat {
  font-size: 0.88rem;
}

/* Yazdırma: navbar, filtreler ve işlem sütunları gizlenir */
@media print {
  header,
  footer,
  .erp-no-print {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .erp-scroll-region,
  .erp-scroll-region-lg,
  .erp-scroll-region-kar,
  .erp-kar-table-panel-body {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }

  .erp-panel,
  .erp-sub-panel {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
  }

  .erp-home-kpi-card {
    border: 1px solid #dee2e6 !important;
    box-shadow: none !important;
  }

  .erp-data-table {
    font-size: 0.8rem;
  }

  .erp-data-table th,
  .erp-data-table td {
    padding: 0.25rem 0.35rem !important;
  }

  a[href]:after {
    content: none !important;
  }
}

/* Teklif formu — salt okunur toplamlar */
.teklif-satir-toplam {
  pointer-events: none;
  user-select: none;
}

.teklif-tablo-toplam-val {
  color: #08558d;
  min-width: 7rem;
  text-align: right;
}

.erp-pagination {
  background: #f8f9fa;
}

/* Teklif yazdırma şablonu */
@font-face {
  font-family: "Nilsen Print";
  src: url("/fonts/NotoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Nilsen Print";
  src: url("/fonts/NotoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

.erp-teklif-print-body {
  margin: 0;
  padding: 1.5rem 2.5rem;
  background: #fff;
  color: #111;
  font-family: "Nilsen Print", "Noto Sans", Arial, sans-serif;
  font-size: 11pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.erp-teklif-print {
  max-width: 210mm;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.erp-teklif-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.teklif-usd-mode .teklif-pb-col {
  display: none !important;
}

.erp-teklif-print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.erp-teklif-logo {
  height: 48px;
  width: auto;
}

.erp-teklif-rule {
  border: none;
  border-top: 3px solid #234a86;
  margin: 0.4rem 0 0;
}

.erp-teklif-band {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 1.5rem 0 1.25rem;
}

.erp-teklif-meta {
  text-align: right;
  font-size: 10.5pt;
  line-height: 1.6;
  white-space: nowrap;
}

.erp-teklif-musteri {
  line-height: 1.6;
  font-size: 10.5pt;
}

.erp-teklif-firma {
  font-weight: 700;
  font-size: 11pt;
  margin-left: 64px;
  margin-bottom: 0.2rem;
}

.erp-teklif-musteri-satir {
  display: flex;
  gap: 0.25rem;
}

.erp-teklif-lbl {
  display: inline-block;
  min-width: 64px;
  font-weight: 700;
}

.erp-teklif-ust,
.erp-teklif-ara-not {
  margin: 1.5rem 0 2.5rem;
  line-height: 1.5;
  font-size: 10.5pt;
}

.erp-teklif-ust {
  white-space: pre-line;
}

.erp-teklif-ara-not {
  margin: 1.75rem 0 1.25rem;
}

.erp-teklif-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5rem;
  font-size: 10pt;
  table-layout: fixed;
}

.erp-teklif-table th,
.erp-teklif-table td {
  border: 1px solid #000;
  padding: 0.3rem 0.5rem;
  vertical-align: middle;
  height: 1.15rem;
  overflow: hidden;
  word-wrap: break-word;
}

.erp-teklif-table thead th {
  background: #d4d4d4;
  font-weight: 700;
  text-align: center;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.erp-teklif-table .col-no {
  width: 2.2rem;
  text-align: center;
}

.erp-teklif-table .col-ad {
  text-align: left;
}

.erp-teklif-table .col-adet {
  width: 4.5rem;
  text-align: center;
}

.erp-teklif-table .col-fiyat {
  width: 7rem;
  text-align: center;
  white-space: nowrap;
}

.erp-teklif-table .col-toplam {
  width: 7rem;
  text-align: center;
  white-space: nowrap;
}

.erp-teklif-toplam-row .erp-teklif-noborder {
  border: none;
}

.erp-teklif-toplam-row .erp-teklif-toplam-lbl {
  text-align: right;
  font-weight: 700;
}

.erp-teklif-toplam-row .col-toplam {
  font-weight: 700;
}

.erp-teklif-iscilik {
  border-collapse: collapse;
  margin: 3rem 0 0 auto;
  font-size: 11pt;
}

.erp-teklif-iscilik td {
  border: 1px solid #000;
  padding: 0.45rem 1rem;
  font-weight: 700;
  text-align: center;
}

.erp-teklif-iscilik-lbl {
  min-width: 10rem;
}

.erp-teklif-iscilik-val {
  min-width: 7rem;
  white-space: nowrap;
}

.erp-teklif-iscilik-hesap .erp-form-hint {
  max-width: 42rem;
}

.erp-iscilik-hesap-table input.form-control-sm {
  min-width: 0;
}

.erp-iscilik-hesap-ozet {
  background: var(--erp-surface-muted, #f8f9fa);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
}

.erp-teklif-kosullar {
  margin-top: 2rem;
  line-height: 1.6;
  font-size: 10.5pt;
}

.erp-teklif-footer {
  margin-top: 1.5rem;
  font-size: 9.5pt;
  color: #234a86;
  text-align: center;
  font-weight: 700;
  line-height: 1.6;
}

.erp-teklif-footer .erp-teklif-rule {
  margin-bottom: 0.5rem;
}

@media print {
  @page {
    size: A4;
    margin: 12mm 10mm;
  }

  .erp-teklif-print-body {
    padding: 0;
  }

  .erp-teklif-print {
    min-height: 271mm;
  }
}

/* Servis yazdırma şablonu */
.erp-servis-print-body {
  margin: 0;
  padding: 1.5rem 2rem;
  background: #fff;
  color: #111;
  font-family: "Nilsen Print", "Noto Sans", Arial, sans-serif;
  font-size: 10.5pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.erp-servis-print {
  max-width: 210mm;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 271mm;
  min-height: 271mm;
}

.erp-servis-print-header-block {
  flex-shrink: 0;
}

.erp-servis-print-top {
  flex-shrink: 0;
}

.erp-servis-print-fill {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.erp-servis-print-fill--pin-bottom {
  justify-content: flex-end;
}

.erp-servis-print-middle {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  transform-origin: center center;
}

.erp-servis-print-fill--pin-bottom .erp-servis-print-middle {
  transform-origin: bottom center;
}

.erp-servis-print-middle--md .erp-servis-print-table-parts,
.erp-servis-print-middle--md .erp-servis-print-table-fees {
  font-size: 0.7rem;
}

.erp-servis-print-middle--md .erp-servis-print-table-parts th,
.erp-servis-print-middle--md .erp-servis-print-table-parts td,
.erp-servis-print-middle--md .erp-servis-print-table-fees th,
.erp-servis-print-middle--md .erp-servis-print-table-fees td {
  padding: 0.18rem 0.28rem;
}

.erp-servis-print-middle--md .erp-servis-print-machine-title {
  font-size: 0.76rem;
  margin-bottom: 0.25rem;
}

.erp-servis-print-middle--md .erp-servis-print-section {
  margin-bottom: 0.85rem;
}

.erp-servis-print-middle--lg .erp-servis-print-table-parts,
.erp-servis-print-middle--lg .erp-servis-print-table-fees {
  font-size: 0.68rem;
}

.erp-servis-print-middle--lg .erp-servis-print-table-parts th,
.erp-servis-print-middle--lg .erp-servis-print-table-parts td,
.erp-servis-print-middle--lg .erp-servis-print-table-fees th,
.erp-servis-print-middle--lg .erp-servis-print-table-fees td {
  padding: 0.14rem 0.22rem;
}

.erp-servis-print-middle--lg .erp-servis-print-machine-title {
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
}

.erp-servis-print-middle--lg .erp-servis-print-section-title {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.erp-servis-print-middle--lg .erp-servis-print-section {
  margin-bottom: 0.65rem;
}

.erp-servis-print-middle--lg .erp-servis-print-machine-grid {
  gap: 0.45rem 0.65rem;
}

.erp-servis-print-middle--xl .erp-servis-print-table-parts,
.erp-servis-print-middle--xl .erp-servis-print-table-fees {
  font-size: 0.62rem;
}

.erp-servis-print-middle--xl .erp-servis-print-table-parts th,
.erp-servis-print-middle--xl .erp-servis-print-table-parts td,
.erp-servis-print-middle--xl .erp-servis-print-table-fees th,
.erp-servis-print-middle--xl .erp-servis-print-table-fees td {
  padding: 0.1rem 0.18rem;
}

.erp-servis-print-middle--xl .erp-servis-print-machine-title {
  font-size: 0.64rem;
  margin-bottom: 0.15rem;
}

.erp-servis-print-middle--xl .erp-servis-print-section-title {
  font-size: 0.76rem;
  margin-bottom: 0.25rem;
}

.erp-servis-print-middle--xl .erp-servis-print-section {
  margin-bottom: 0.45rem;
}

.erp-servis-print-middle--xl .erp-servis-print-machine-grid {
  gap: 0.35rem 0.5rem;
}

.erp-servis-print-middle--xl .erp-servis-print-totals-row {
  padding: 0.12rem 0;
}

.erp-servis-print-middle--xl .erp-servis-print-totals {
  margin-top: 0.4rem;
}

.erp-servis-print-bottom {
  flex-shrink: 0;
  padding-top: 0;
}

.erp-servis-print-footer-screen {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: #888;
  text-align: right;
}

.erp-servis-print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.erp-servis-print-logo {
  height: 42px;
  width: auto;
}

.erp-servis-print-title-block {
  text-align: right;
}

.erp-servis-print-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #08558d;
}

.erp-servis-print-no {
  font-size: 0.95rem;
  color: #555;
}

.erp-servis-print-rule {
  border: 0;
  border-top: 2px solid #08558d;
  margin: 0.75rem 0 1rem;
}

.erp-servis-print-section {
  margin-bottom: 1.25rem;
}

.erp-servis-print-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #08558d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  break-after: avoid;
  page-break-after: avoid;
}

.erp-servis-print-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.5rem;
  margin: 0;
}

.erp-servis-print-meta > div {
  display: flex;
  gap: 0.5rem;
}

.erp-servis-print-meta dt {
  min-width: 5.5rem;
  margin: 0;
  font-weight: 600;
  color: #444;
}

.erp-servis-print-meta dd {
  margin: 0;
  flex: 1;
}

.erp-servis-print-aciklama {
  margin-top: 0.75rem;
}

.erp-servis-print-lbl {
  display: block;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.2rem;
}

.erp-servis-print-aciklama p {
  margin: 0;
  white-space: pre-wrap;
}

.erp-servis-print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.erp-servis-print-table th,
.erp-servis-print-table td {
  border: 1px solid #c8d3dc;
  padding: 0.3rem 0.45rem;
  vertical-align: top;
}

.erp-servis-print-table thead th {
  background: #e8f2f8;
  color: #08558d;
  font-weight: 600;
}

.erp-servis-print-table-fees th,
.erp-servis-print-table-fees td {
  font-size: 0.78rem;
}

.erp-servis-print-totals {
  margin-top: 0.65rem;
  max-width: 18rem;
  margin-left: auto;
  break-inside: avoid;
  page-break-inside: avoid;
}

.erp-servis-print-totals-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed #dde4ea;
}

.erp-servis-print-totals-grand {
  font-size: 1rem;
  font-weight: 700;
  border-bottom: none;
  padding-top: 0.35rem;
  color: #08558d;
}

.erp-servis-print-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #666;
}

.erp-servis-print-kdv-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #555;
  text-align: right;
}

.erp-servis-print-machine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.erp-servis-print-machine {
  margin-bottom: 0;
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.erp-servis-print-machine-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.erp-servis-print-table-parts {
  width: 100%;
  table-layout: fixed;
  font-size: 0.76rem;
}

.erp-servis-print-col-seri {
  width: 5.5rem;
}

.erp-servis-print-col-adet {
  width: 2.25rem;
}

.erp-servis-print-table-parts th,
.erp-servis-print-table-parts td {
  padding: 0.25rem 0.35rem;
  overflow: hidden;
}

.erp-servis-print-table-parts th:first-child,
.erp-servis-print-table-parts td:first-child {
  white-space: nowrap;
  text-overflow: ellipsis;
}

.erp-servis-print-table-parts th:last-child,
.erp-servis-print-table-parts td:last-child {
  white-space: nowrap;
  padding-left: 0.2rem;
  padding-right: 0.25rem;
}

.erp-servis-print-table-parts th:nth-child(2),
.erp-servis-print-table-parts td:nth-child(2) {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.erp-servis-print-empty-row {
  color: #666;
  font-style: italic;
  text-align: center;
}

.erp-servis-print-strike {
  text-decoration: line-through;
  color: #777;
}

.erp-servis-imza-panel .erp-servis-imza-onizleme {
  max-width: 320px;
  border: 1px solid #c8d3dc;
  border-radius: 0.35rem;
  background: #fff;
  padding: 0.35rem;
}

.erp-servis-imza-panel .erp-servis-imza-onizleme img {
  display: block;
  width: 100%;
  height: auto;
}

.erp-servis-imza-canvas-wrap {
  border: 1px solid #c8d3dc;
  border-radius: 0.35rem;
  background: #fff;
  max-width: 560px;
}

.erp-servis-imza-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.erp-servis-print-imza-meta {
  margin-bottom: 0.35rem;
}

.erp-servis-print-imza-ozet {
  margin-bottom: 0.3rem;
  font-size: inherit;
  line-height: inherit;
  color: #111;
}

.erp-servis-print-imza-isim {
  font-weight: 600;
}

.erp-servis-print-imza-img {
  max-width: 200px;
  max-height: 58px;
  border: 1px solid #c8d3dc;
  border-radius: 0.2rem;
  padding: 0.2rem;
  background: #fff;
}

.erp-servis-print-imza-img img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}

.erp-servis-print-imza-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.erp-servis-print-imza-kutu-baslik {
  font-size: 0.76rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  color: #08558d;
}

.erp-servis-print-imza {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0.3rem;
  border-top: 1px solid #dde4ea;
}

.erp-servis-print-imza .erp-servis-print-section-title {
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.erp-servis-print-imza-beyan {
  margin: 0 0 0.35rem;
  font-size: inherit;
  line-height: inherit;
  color: #111;
  white-space: pre-wrap;
}

@media print {
  @page {
    size: A4;
    margin: 12mm 10mm;
  }

  html,
  .erp-servis-print-body {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .erp-servis-print-body {
    padding: 0;
  }

  .erp-servis-print {
    height: 271mm;
    min-height: 271mm;
    max-height: 271mm;
    overflow: hidden;
  }

  .erp-servis-print-footer-screen {
    display: none;
  }

  .erp-servis-print-imza-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .erp-servis-print-imza-grid {
    grid-template-columns: 1fr;
  }
}

.erp-servis-print-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.erp-servis-print-kpi {
  border: 1px solid #c8d3dc;
  border-radius: 0.25rem;
  padding: 0.45rem 0.55rem;
  text-align: center;
}

.erp-servis-print-kpi-val {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #08558d;
}

.erp-servis-print-kpi-lbl {
  display: block;
  font-size: 0.68rem;
  color: #666;
  margin-top: 0.15rem;
}

.erp-servis-print-table-compact th,
.erp-servis-print-table-compact td {
  font-size: 0.72rem;
  padding: 0.22rem 0.35rem;
}

@media print {
  .erp-detail-page .erp-page-header,
  .erp-detail-page .erp-panel-head {
    break-after: avoid;
  }

  .erp-detail-page .row.g-3 {
    display: block !important;
  }

  .erp-detail-page .row.g-3 > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}
