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-link hariç (şeffaf arka planda görünmez olur) */
.btn:not(.btn-link) {
  color: #fff !important;
}

.btn-link {
  --bs-btn-color: var(--button-color);
  --bs-btn-hover-color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 8%));
  --bs-btn-active-color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 8%));
  color: var(--button-color) !important;
  text-decoration: none;
}

.btn-link:hover,
.btn-link:focus,
.btn-link:active,
.btn-link:focus-visible {
  color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 8%)) !important;
  text-decoration: underline;
}

/* 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);
  --erp-navbar-height: 3.25rem;
  --erp-sidebar-width: 260px;
  --erp-sidebar-collapsed-width: 72px;
  /* Geniş monitörde içerik şeridi üst sınırı (laptop genişliğine yakın) */
  --erp-content-max-width: 104rem;
  --erp-page-bg: #ffffff;
  --erp-panel-bg: #ffffff;
  --erp-input-bg: #ffffff;
  --erp-table-bg: #ffffff;
  --erp-table-bg-alt: #f8f9fa;
  --erp-table-bg-hover: #e9ecef;
  --erp-table-filter-bg: #ffffff;
}


/* Navbar (login / legacy) */
.navbar {
  background-color: var(--navbar-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.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;
  overflow: hidden;
  isolation: isolate;
}
.navbar .nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle 5rem at var(--erp-glow-x, 50%) var(--erp-glow-y, 50%),
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.14) 32%,
    transparent 68%
  );
}
.navbar .nav-link:hover,
.navbar .nav-link:focus-visible {
  background-color: rgba(var(--navbar-rgb), 0.14);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
  color: #fff !important;
}
.navbar .nav-link:hover::before,
.navbar .nav-link:focus-visible::before {
  opacity: 1;
}
.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-visible::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .erp-app-nav-link::before,
  .erp-app-foot-link::before,
  .erp-app-sidebar-collapse-btn::before,
  .erp-app-sidebar-close-btn::before,
  .erp-app-sidebar-toggle-btn::before,
  .navbar .nav-link::before {
    display: none;
  }
}

/* Table header accent — ana panel başlığı değil; bölüm başlığı tonu */
body:not(.login-page):not(.portal-page) .table thead th {
  background-color: var(--erp-section-head-bg);
  color: var(--erp-section-head-color);
  border-bottom: 2px solid var(--erp-section-head-border);
}

.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: 0;
}

.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 — ERP / portal arka plan geçişi (opacity crossfade, hafif) */
body.login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: hsl(var(--primary-h), 70%, 14%);
}

body.login-page::before,
body.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body.login-page::before {
  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%);
  opacity: 1;
}

body.login-page::after {
  background: linear-gradient(135deg,
    hsl(calc(var(--primary-h) + 6), calc(var(--primary-s) + 4%), calc(var(--primary-l) + 3%)) 0%,
    hsl(calc(var(--primary-h) + 10), var(--primary-s), calc(var(--primary-l) + 8%)) 45%,
    hsl(var(--primary-h), 58%, 17%) 100%);
  opacity: 0;
}

html[data-login-theme="portal"] body.login-page::before {
  opacity: 0;
}

html[data-login-theme="portal"] body.login-page::after {
  opacity: 1;
}

html[data-login-animate="1"] body.login-page::before,
html[data-login-animate="1"] body.login-page::after {
  transition: opacity 0.85s ease;
}

@media (prefers-reduced-motion: reduce) {
  html[data-login-animate="1"] body.login-page::before,
  html[data-login-animate="1"] body.login-page::after {
    transition: none;
  }
}

.login-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

.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 {
  display: block;
  max-height: 72px;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto 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-page-credit {
  margin-top: auto;
  flex-shrink: 0;
}

body.login-page .login-page-credit .erp-yazilim-credit {
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0;
}

body.login-page .login-page-credit .erp-yazilim-credit a {
  color: rgba(255, 255, 255, 0.92);
}

body.login-page .login-page-credit .erp-yazilim-credit a:hover {
  color: #fff;
}

.erp-yazilim-credit {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.35rem;
}

.erp-yazilim-credit a {
  color: #6b7280;
  text-decoration: none;
}

.erp-yazilim-credit a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.portal-footer .erp-yazilim-credit {
  color: rgba(255, 255, 255, 0.55);
}

.portal-footer .erp-yazilim-credit a {
  color: rgba(255, 255, 255, 0.65);
}

.erp-yazilim-credit-print {
  font-size: 0.65rem;
  color: #888;
  margin-top: 0.25rem;
}

.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;
}

.login-welcome {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}

.login-welcome-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  width: 100%;
  max-width: 22rem;
  animation: loginWelcomeIn 0.45s ease-out both;
}

.login-welcome-logo {
  margin-bottom: 1.25rem;
}

@media (max-width: 575.98px) {
  .login-welcome,
  .login-wrapper {
    padding: 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .login-welcome-card {
    padding: 1.75rem 1.15rem 1.5rem;
  }

  .login-logo {
    max-height: 56px;
  }
}

.login-welcome-greet {
  font-size: 0.95rem;
  color: #495057;
}

.login-welcome-spinner {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0.75rem auto 1rem;
  border: 3px solid hsl(var(--button-h), var(--button-s), calc(var(--button-l) + 28%));
  border-top-color: hsl(var(--button-h), var(--button-s), var(--button-l));
  border-radius: 50%;
  animation: loginWelcomeSpin 0.75s linear infinite;
}

.login-welcome-msg {
  font-weight: 600;
  font-size: 0.95rem;
  color: #212529;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.login-welcome-sub {
  min-height: 1.25rem;
  margin-top: 0.35rem;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.login-welcome-msg--out,
.login-welcome-sub.login-welcome-msg--out {
  opacity: 0;
  transform: translateY(4px);
}

@keyframes loginWelcomeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loginWelcomeSpin {
  to {
    transform: rotate(360deg);
  }
}

/* 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;
}

.erp-content-width-label {
  font-size: 0.85rem;
  color: #495057;
  text-align: center;
}

.erp-content-width-hint {
  font-size: 0.75rem;
  color: #6c757d;
  text-align: center;
  line-height: 1.25;
}

.erp-content-width-option input:checked ~ .erp-content-width-label {
  color: var(--button-color);
  font-weight: 600;
}

.model-listesi .model-item {
  display: grid;
  grid-template-columns: var(--erp-model-catalog-thumb-col, 80px) minmax(16rem, 2.4fr) minmax(0, 1.2fr) auto;
  gap: 0.65rem 1rem;
  align-items: center;
  border-left: 3px solid transparent;
  transition:
    background-color 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.model-listesi .model-item.model-item-clickable {
  cursor: pointer;
}

.model-listesi .model-item.model-item-no-actions {
  grid-template-columns: var(--erp-model-catalog-thumb-col, 80px) minmax(16rem, 2.4fr) minmax(0, 1fr);
}

.model-item-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-item-thumb-btn {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
  border-radius: 0.375rem;
}

.model-item-thumb-btn:hover .erp-model-catalog-thumb,
.model-item-thumb-btn:focus-visible .erp-model-catalog-thumb {
  border-color: rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.erp-model-foto-modal-img {
  max-width: 100%;
  max-height: min(75vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.375rem;
}

.erp-model-catalog-thumb {
  width: var(--erp-model-catalog-thumb-size, 72px);
  height: var(--erp-model-catalog-thumb-size, 72px);
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
}

.erp-model-catalog-thumb-placeholder {
  display: block;
  width: var(--erp-model-catalog-thumb-size, 72px);
  height: var(--erp-model-catalog-thumb-size, 72px);
  border-radius: 0.375rem;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.03);
}

.erp-uretim-siparis-table .erp-uretim-siparis-col-thumb {
  width: var(--erp-model-catalog-thumb-col, 80px);
  max-width: var(--erp-model-catalog-thumb-col, 80px);
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  padding-right: 0.35rem;
  vertical-align: middle;
}

.erp-uretim-siparis-table .erp-uretim-siparis-col-thumb .model-item-thumb-btn {
  display: block;
  line-height: 0;
}

.erp-uretim-siparis-table .erp-model-catalog-thumb,
.erp-uretim-siparis-table .erp-model-catalog-thumb-placeholder {
  width: var(--erp-model-catalog-thumb-size, 72px);
  height: var(--erp-model-catalog-thumb-size, 72px);
  max-width: var(--erp-model-catalog-thumb-size, 72px);
  max-height: var(--erp-model-catalog-thumb-size, 72px);
}

.erp-uretim-aktif-list .erp-uretim-siparis-table thead th {
  text-align: center;
  padding-top: 0.08rem;
  padding-bottom: 0.08rem;
  line-height: 1.1;
  vertical-align: middle;
}

.erp-uretim-aktif-list .erp-uretim-siparis-table tbody td {
  text-align: center;
  vertical-align: middle;
}

.erp-uretim-aktif-list .erp-uretim-siparis-table .erp-uretim-siparis-col-thumb .model-item-thumb-btn {
  display: inline-block;
}

.erp-uretim-aktif-list .erp-uretim-siparis-table .erp-model-catalog-thumb,
.erp-uretim-aktif-list .erp-uretim-siparis-table .erp-model-catalog-thumb-placeholder {
  margin-left: auto;
  margin-right: auto;
}

.erp-uretim-siparis-table {
  border-collapse: separate;
  border-spacing: 0 0.3rem;
}

.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable {
  cursor: pointer;
}

.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable td {
  transition:
    background-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:hover td,
.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:focus-visible td {
  background-color: var(--erp-table-bg-hover) !important;
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 1;
}

.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:hover td:first-child,
.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:focus-visible td:first-child {
  border-radius: 0.375rem 0 0 0.375rem;
}

.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:hover td:last-child,
.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:focus-visible td:last-child {
  border-radius: 0 0.375rem 0.375rem 0;
}

.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:active td {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.erp-uretim-siparis-table tbody tr.erp-uretim-siparis-row-clickable:focus-visible {
  outline: none;
}

.erp-uretim-musteri-grup .erp-sub-panel-head-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.erp-uretim-grup-list-items > .erp-uretim-musteri-grup:last-child {
  margin-bottom: 0 !important;
}

.erp-uretim-grup-drag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  cursor: grab;
  color: inherit;
  opacity: 0.55;
  touch-action: none;
}

.erp-uretim-grup-drag:hover,
.erp-uretim-grup-drag:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}

.erp-uretim-grup-drag:active {
  cursor: grabbing;
}

.erp-uretim-grup-drag-lines {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}

.erp-uretim-grup-dragging {
  opacity: 0.55;
}

.erp-uretim-grup-dragover {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.erp-uretim-musteri-grup .erp-uretim-siparis-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  border-bottom-width: 1px;
}

.erp-uretim-emir-table {
  table-layout: fixed;
  width: 100%;
}

.erp-uretim-emir-table thead th,
.erp-uretim-emir-table tbody td {
  text-align: center;
  vertical-align: middle;
}

.erp-uretim-emir-table thead th:not(:last-child),
.erp-uretim-emir-table tbody td:not(:last-child) {
  border-right: 1px solid #dee2e6;
}

.erp-uretim-emir-col-sira {
  width: 2.4rem;
}

.erp-uretim-emir-col-durum {
  width: 6.25rem;
}

.erp-uretim-emir-col-seri {
  width: 6.5rem;
}

.erp-uretim-emir-col-personel {
  width: 10.9rem;
}

.erp-uretim-emir-col-not {
  width: auto;
}

.erp-uretim-emir-col-tarih {
  width: 7.25rem;
}

.erp-uretim-emir-col-bitis {
  width: 15.5rem;
  min-width: 15.5rem;
  white-space: nowrap;
}

.erp-uretim-emir-col-bitis .erp-uretim-emir-date-input {
  width: 9.5rem;
  max-width: 9.5rem;
  flex: 0 0 9.5rem;
}

.erp-uretim-tahmini-wrap {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.erp-uretim-emir-col-islem {
  width: 14rem; /* 21rem ÷ 1.5 */
  white-space: nowrap;
}

.erp-uretim-emir-seri-input,
.erp-uretim-emir-personel-input,
.erp-uretim-emir-date-input {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.erp-uretim-emir-not-cell {
  padding-left: 0.45rem !important;
  padding-right: 0.45rem !important;
}

.erp-uretim-emir-not-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.erp-uretim-emir-not-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 1.85rem;
  min-height: 1.85rem;
  max-height: 1.85rem;
  resize: none;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
}

.erp-uretim-emir-not-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.erp-uretim-emir-not-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.erp-uretim-tab-root {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: 0.75rem;
  overflow: hidden;
}

.erp-uretim-tab-root > .erp-uretim-split {
  flex: 1 1 auto;
  min-height: 0;
}

.erp-uretim-split {
  min-height: 0;
}

.erp-uretim-split > [class*="col-"] {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.erp-uretim-tab-root .erp-uretim-aktif-list,
.erp-uretim-tab-root .erp-uretim-aktif-panel,
.erp-uretim-tab-root .erp-uretim-arsiv-panel {
  min-height: 0;
  flex: 1 1 auto;
}

.erp-uretim-aktif-panel,
.erp-uretim-aktif-list,
.erp-uretim-arsiv-panel {
  min-height: 0;
}

.erp-uretim-tab-root .erp-uretim-siparis-list.erp-scroll-region-lg,
.erp-uretim-tab-root .erp-scroll-region-lg {
  max-height: none;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.erp-uretim-tab-root .erp-uretim-arsiv-panel > .erp-sub-panel-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.erp-uretim-arsiv-panel .erp-sub-panel-head {
  background: rgba(0, 0, 0, 0.02);
}

.erp-uretim-siparis-table-compact {
  font-size: 0.8125rem;
}

.erp-uretim-siparis-table-compact thead th {
  font-size: 0.6875rem;
}

.erp-uretim-musteri-grup-compact .erp-sub-panel-head {
  font-size: 0.875rem;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

.erp-uretim-musteri-grup-compact .badge {
  font-size: 0.65rem;
}

.erp-uretim-musteri-grup-compact .btn-sm {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
}

.erp-uretim-siparis-table-compact .badge {
  font-size: 0.65rem;
  padding: 0.2em 0.45em;
}

.erp-uretim-talep-table-compact {
  font-size: 0.8125rem;
}

.erp-uretim-talep-table-compact thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  border-bottom-width: 1px;
}

.erp-uretim-talep-table-compact .btn-sm {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
}

.erp-satin-alma-ihtiyac-side-panel.erp-uretim-arsiv-panel,
.erp-satin-alma-siparisler-root .erp-uretim-arsiv-panel {
  min-height: 0;
}

.erp-ek-parca-sebep-select {
  width: auto !important;
  min-width: 6.75rem;
  max-width: 9.5rem;
  flex: 0 0 auto;
}

.erp-maliyet-toplam-block {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  margin-left: auto;
  width: max-content;
  max-width: 100%;
}

.erp-maliyet-toplam-satir {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 1.25rem;
  align-items: baseline;
  padding: 0.2rem 0;
}

.erp-maliyet-toplam-satir .erp-maliyet-toplam-etiket {
  text-align: left;
  white-space: nowrap;
}

.erp-maliyet-toplam-satir .erp-maliyet-toplam-rakam {
  text-align: right;
  white-space: nowrap;
  min-width: 5.5rem;
}

.erp-maliyet-kur-form {
  margin-left: auto;
  width: max-content;
  max-width: 100%;
}

.erp-maliyet-kur-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
}

.erp-maliyet-kur-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.erp-maliyet-kur-field .form-label {
  margin-bottom: 0;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.erp-maliyet-kur-field .form-control {
  width: 6.75rem;
  max-width: 100%;
}

#uretimCreateModal .modal-dialog {
  max-width: 40rem;
}

#uretimCreateModal .modal-body {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

#uretimCreateModal #uretimSatirTable th:nth-child(2),
#uretimCreateModal #uretimSatirTable td:nth-child(2) {
  width: 9.5rem;
}

#uretimCreateModal #uretimSatirTable th:nth-child(3),
#uretimCreateModal #uretimSatirTable td:nth-child(3) {
  width: 4.5rem;
}

#uretimCreateModal #uretimSatirTable th:nth-child(4),
#uretimCreateModal #uretimSatirTable td:nth-child(4) {
  width: 2rem;
}

@media (max-width: 991.98px) {
  .erp-uretim-tab-root {
    min-height: auto;
    height: auto !important;
    max-height: none !important;
    overflow: visible;
  }

  .erp-uretim-tab-root > .erp-uretim-split {
    min-height: auto;
  }

  .erp-uretim-tab-root .erp-uretim-aktif-list,
  .erp-uretim-tab-root .erp-uretim-aktif-panel,
  .erp-uretim-tab-root .erp-uretim-arsiv-panel {
    min-height: 320px;
  }

  .erp-uretim-tab-root .erp-uretim-siparis-list.erp-scroll-region-lg,
  .erp-uretim-tab-root .erp-scroll-region-lg {
    max-height: min(42vh, 420px);
    height: auto;
    flex: initial;
  }

  .erp-list-tabs-bar {
    align-items: stretch !important;
  }

  .erp-uretim-tab-toolbar {
    width: 100%;
    margin-left: 0 !important;
    padding-bottom: 0.5rem !important;
  }

  .erp-uretim-split {
    min-height: auto;
  }

  .erp-uretim-aktif-panel,
  .erp-uretim-aktif-list,
  .erp-uretim-arsiv-panel {
    min-height: 320px;
  }
}

.erp-uretim-talep-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 10.25rem);
  max-height: calc(100vh - 10.25rem);
  margin-bottom: 0 !important;
}

.erp-uretim-talep-head {
  flex-shrink: 0;
}

.erp-uretim-talep-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.erp-uretim-talep-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.erp-uretim-talep-panel .erp-sub-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.erp-uretim-talep-form-fill {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.erp-uretim-talep-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.erp-uretim-talep-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fa;
  box-shadow: 0 1px 0 #dee2e6;
}

.erp-uretim-talep-footer {
  flex-shrink: 0;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dee2e6;
  background: var(--erp-page-bg, #fff);
}

@media (max-width: 991.98px) {
  .erp-uretim-talep-page {
    min-height: auto;
    max-height: none;
  }

  .erp-uretim-talep-panel {
    min-height: min(52vh, 480px);
  }

  .erp-uretim-talep-table-wrap {
    max-height: min(52vh, 480px);
  }
}

.erp-uretim-toplam-print-table .col-adet,
.erp-uretim-toplam-table th.text-end,
.erp-uretim-toplam-table td.text-end {
  white-space: nowrap;
}

.erp-uretim-atolye-print-section {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.erp-uretim-atolye-print-table .col-adet,
.erp-uretim-atolye-table th.text-end,
.erp-uretim-atolye-table td.text-end {
  white-space: nowrap;
}

.erp-uretim-atolye-print-sub {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.15rem;
}

.erp-model-catalog-thumb-lg {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
}

.erp-model-catalog-thumb-placeholder-lg {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 0.375rem;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.03);
}

.erp-marka-catalog .model-listesi .model-item-clickable:hover {
  background-color: rgba(0, 0, 0, 0.035);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.12),
    0 3px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.erp-marka-catalog .model-listesi .model-item-clickable:active {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.06);
}

.erp-marka-catalog .model-listesi .model-item-clickable:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.45);
  outline-offset: 2px;
}

.erp-marka-catalog .model-listesi .model-item-clickable:hover .model-item-name {
  color: var(--button-color, #0d6efd);
}

.model-item-name {
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.22s ease;
}

.model-item-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.model-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 767.98px) {
  .model-listesi .model-item {
    grid-template-columns: var(--erp-model-catalog-thumb-col, 80px) 1fr;
    gap: 0.5rem;
  }

  .model-item-badges,
  .model-item-actions {
    grid-column: 1 / -1;
  }

  .model-item-actions {
    justify-content: flex-start;
  }
}

.erp-marka-catalog-toolbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.erp-marka-card-head {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.erp-marka-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.erp-marka-card-name {
  font-weight: 600;
}

.model-item-has-data {
  border-left-color: #ffc107;
}

@media (prefers-reduced-motion: reduce) {
  .model-listesi .model-item,
  .model-item-name {
    transition: none;
  }

  .erp-marka-catalog .model-listesi .model-item-clickable:hover {
    transform: none;
  }

  .erp-marka-catalog .model-listesi .model-item-clickable:active {
    transform: none;
  }
}

.erp-delete-impact-box {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.375rem;
  background: #f8f9fa;
  padding: 0.75rem 0.875rem;
}

.erp-delete-impact-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.erp-delete-impact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.erp-delete-impact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}

.erp-delete-confirm-fields .form-label strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

footer.footer {
  margin-top: auto;
}

footer.footer .container {
  line-height: 1.5;
}

/* Müşteri portalı */
.portal-page {
  background: #f4f6f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--button-color);
  color: #fff;
  padding: 0.65rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
}

.portal-brand-logo {
  height: 32px;
  width: auto;
}

.portal-brand-text {
  font-weight: 600;
  font-size: 1rem;
}

.portal-makine-checklist {
  max-height: 14rem;
  overflow-y: auto;
  background: #fff;
}

.portal-makine-checklist .form-check {
  margin-bottom: 0.35rem;
}

.portal-makine-checklist .form-check:last-child {
  margin-bottom: 0;
}

.portal-main {
  flex: 1;
}

.portal-main > .container-fluid {
  max-width: 56rem;
  margin-inline: auto;
}

.portal-footer {
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-footer-link {
  color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 8%));
  text-decoration: none;
  font-size: 0.875rem;
}

.portal-footer-link:hover {
  text-decoration: underline;
}

.portal-karsilama-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.portal-karsilama-card {
  width: 100%;
  max-width: 32rem;
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.portal-karsilama-head {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-karsilama-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.portal-karsilama-foot {
  padding: 0.85rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafbfc;
}

.portal-karsilama-list {
  display: grid;
  gap: 0.85rem;
}

.portal-karsilama-item dt {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--button-color, #1a4d6d);
  margin-bottom: 0.2rem;
}

.portal-karsilama-item dd {
  margin: 0;
  font-size: 0.875rem;
  color: #444;
  line-height: 1.45;
}

.portal-yasal-page {
  min-height: 100vh;
  padding: 1.5rem 1rem 2.5rem;
}

.portal-yasal-inner {
  max-width: 52rem;
  margin-inline: auto;
}

.portal-yasal-back a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.9rem;
}

.erp-settings-logo-preview {
  max-height: 40px;
  max-width: 120px;
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 4px;
  background: #fff;
}

.erp-settings-logo-preview-lg {
  max-height: 56px;
  max-width: 160px;
}

.erp-settings-logo-preview-filigran {
  max-height: 72px;
  max-width: 72px;
}

.erp-settings-logo-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  color: #888;
  font-size: 0.75rem;
  background: #f6f6f6;
}

.erp-filigran-opaklik {
  max-width: 22rem;
}

.erp-filigran-alanlar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.erp-email-imza-onizleme {
  background: #f4f6f8;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
}

.erp-email-imza-onizleme-bos {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

body.login-page .portal-yasal-page .erp-panel {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.login-page .portal-yasal-page .erp-page-header h1,
body.login-page .portal-yasal-page .erp-page-header p {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.portal-stat-card {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-stat-card-muted {
  opacity: 0.92;
}

.portal-stat-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.35rem;
}

.portal-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--button-color);
  line-height: 1.2;
}

.portal-stat-hint {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.25rem;
}

.portal-stat-card-link {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  color: inherit;
}

.portal-stat-card-link:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.portal-stat-value-sm {
  font-size: 1.25rem;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 0.5rem;
  margin-top: 0.15rem;
}

.portal-nav-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.2rem 0.35rem;
  border-radius: 0.25rem;
}

.portal-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.portal-table-wrap {
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.portal-table-wrap .table {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .portal-table-stack {
    overflow-x: visible;
  }

  .portal-table-stack .table {
    border: 0;
  }

  .portal-table-stack thead {
    display: none;
  }

  .portal-table-stack tbody tr {
    display: block;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .portal-table-stack tbody tr:last-child {
    border-bottom: 0;
  }

  .portal-table-stack tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border: 0;
    text-align: right !important;
  }

  .portal-table-stack tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #666;
    font-size: 0.8rem;
    text-align: left;
    flex-shrink: 0;
    max-width: 42%;
  }

  .portal-table-stack tbody td.portal-table-action {
    display: block;
    padding-top: 0.65rem;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center !important;
  }

  .portal-table-stack tbody td.portal-table-action::before {
    display: none;
  }

  .portal-table-stack tbody td.portal-table-action .btn {
    width: 100%;
  }
}

.portal-detail-card {
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.portal-detail-card--form {
  max-width: 44rem;
}

.portal-detail-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-detail-body {
  padding: 1.25rem;
}

.portal-form {
  max-width: 40rem;
}

.portal-form-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.5rem, 11.5rem);
  gap: 1rem;
  margin-bottom: 1rem;
}

.portal-form-field-email {
  max-width: 22rem;
}

.portal-form-field-konu {
  max-width: 28rem;
}

.portal-form-field-makine {
  max-width: 24rem;
}

.portal-form textarea.form-control {
  max-width: 40rem;
}

@media (max-width: 575.98px) {
  .portal-form-contact-row {
    grid-template-columns: 1fr;
  }

  .portal-form-field-email,
  .portal-form-field-konu,
  .portal-form-field-makine {
    max-width: 100%;
  }
}

.portal-detail-foot {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafbfc;
}

.portal-info-list {
  display: grid;
  gap: 0.65rem;
}

.portal-info-row {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: 0.75rem;
  align-items: start;
}

.portal-info-row dt {
  margin: 0;
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

.portal-info-row dd {
  margin: 0;
}

.portal-pre-wrap {
  white-space: pre-wrap;
}

.portal-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.375rem;
}

.erp-foto-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.erp-foto-card {
  width: 9.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  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;
  cursor: zoom-in;
}

.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-foto-modal-img {
  max-width: 100%;
  max-height: min(80vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: inline-block;
}

.portal-photo-thumb {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.375rem;
  overflow: hidden;
}

.portal-doc-list .list-group-item {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.06);
}

/* 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-detail-page .erp-panel::before,
  .erp-detail-page .erp-panel::after {
    content: none !important;
    box-shadow: none !important;
  }

  .erp-makine-kimlik-foto {
    box-shadow: none !important;
    cursor: default;
  }

  .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;
}

.erp-pagination-compact {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.erp-pagination-compact .small {
  font-size: 0.75rem;
}

.erp-pagination-compact .page-link {
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
}

/* 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 2rem;
  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-maliyet-print {
  max-width: 210mm;
  margin: 0 auto;
}

.erp-teklif-maliyet-print-head {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #c5c5c5;
}

.erp-teklif-maliyet-print-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  margin-bottom: 0.25rem;
}

.erp-teklif-maliyet-print-head h1 {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.erp-teklif-maliyet-print .erp-iscilik-hesap-ozet {
  margin-top: 1rem;
}

.erp-teklif-print {
  max-width: 210mm;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.erp-print-watermark,
.erp-teklif-watermark {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(71.3%, 172.5mm);
  max-height: 172.5mm;
  height: auto;
  object-fit: contain;
  opacity: 0.09;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.erp-teklif-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Tip A / B: tek tablo — tablo bloğu üst bilgi ile koşullar arasında dikey ortalı */
.erp-teklif-print--tek-tablo .erp-teklif-body {
  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;
}

/* Satın alma malzeme talebi PDF — Tip B düzeni, fiyat sütunları yok */
.erp-satin-alma-table .col-adet {
  width: 5.5rem;
}

.erp-satin-alma-print-body {
  padding: 1.5rem 1.5rem;
}

.erp-satin-alma-print {
  min-height: 100vh;
  height: 100%;
  box-sizing: border-box;
}

/* Sayfa kenarı 10mm (logo + alt bilgi); içerik +5mm → toplam 15mm */
.erp-satin-alma-print .erp-teklif-band,
.erp-satin-alma-print .erp-teklif-ust,
.erp-satin-alma-print .erp-teklif-body {
  padding-left: 5mm;
  padding-right: 5mm;
  box-sizing: border-box;
}

.erp-satin-alma-print .erp-satin-alma-not {
  margin: 0.75rem 0 0;
  padding: 0;
}

/* Tablo her zaman üstten; taşarsa JS küçültür. Footer sayfa dibinde. */
.erp-satin-alma-print .erp-teklif-body {
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
}

.erp-satin-alma-print .erp-teklif-footer {
  margin-top: 0;
  flex-shrink: 0;
}

/* Satın Alma PDF: kısa liste → tek sayfa (alt bilgi dipte); uzun → sonraki sayfalar */
body.erp-satin-alma-print-body {
  margin-bottom: 0;
  font-family: "Nilsen Print", "Noto Sans", Arial, sans-serif;
}

.erp-satin-alma-print--sayfalama-body {
  min-height: 0 !important;
  height: auto !important;
}

.erp-satin-alma-print--sayfalama {
  min-height: 275mm !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.erp-satin-alma-print--sayfalama .erp-teklif-body {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
}

.erp-satin-alma-print--sayfalama .erp-teklif-footer {
  margin-top: auto;
  flex-shrink: 0;
}

.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-kosullar .erp-teklif-musteri-satir {
  align-items: flex-start;
}

.erp-teklif-kosullar .erp-teklif-lbl {
  min-width: 7rem;
}

.erp-teklif-kosullar .erp-teklif-musteri-satir > span:last-child {
  flex: 1;
  min-width: 0;
}

.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 teklif-form {
    size: A4;
    margin: 12mm 10mm;
  }

  @page satin-alma-form {
    size: A4;
    margin: 12mm 10mm 10mm 10mm;
  }

  .erp-teklif-print-body {
    page: teklif-form;
    padding: 0;
  }

  .erp-print-watermark,
  .erp-teklif-watermark {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .erp-teklif-print-body.erp-satin-alma-print-body {
    page: satin-alma-form;
  }

  .erp-teklif-print {
    min-height: 271mm;
  }

  .erp-teklif-print--cift-tablo {
    height: 271mm;
    max-height: 271mm;
    overflow: hidden;
  }

  .erp-satin-alma-print-body {
    padding: 0;
    min-height: 275mm;
  }

  .erp-satin-alma-print {
    min-height: 275mm;
    height: 275mm;
    max-height: 275mm;
    overflow: hidden;
  }

  .erp-satin-alma-print .erp-teklif-body {
    justify-content: flex-start;
  }

  .erp-satin-alma-print-body.erp-satin-alma-print--sayfalama-body {
    min-height: 0;
  }

  .erp-satin-alma-print--sayfalama {
    min-height: 275mm;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .erp-satin-alma-print--sayfalama .erp-teklif-footer {
    margin-top: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .erp-satin-alma-print--sayfalama .erp-teklif-table thead {
    display: table-header-group;
  }

  .erp-satin-alma-print--sayfalama .erp-teklif-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .erp-satin-alma-print--sayfalama .erp-teklif-print-header,
  .erp-satin-alma-print--sayfalama .erp-teklif-band,
  .erp-satin-alma-print--sayfalama .erp-teklif-ust {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* 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;
}

html:has(.erp-servis-print-preview-embed),
.erp-servis-print-preview-embed {
  overflow: hidden;
}

.erp-servis-print {
  max-width: 210mm;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 271mm;
  position: relative;
  z-index: 1;
}

.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;
  overflow: hidden;
}

.erp-servis-print-zoomable {
  transform-origin: top center;
}

.erp-servis-print-bottom {
  flex-shrink: 0;
  margin-top: auto;
  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-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;
  touch-action: none;
}

.erp-servis-imza-canvas-host {
  max-width: 560px;
}

.erp-servis-imza-draft-onizleme {
  max-width: 280px;
}

.erp-imza-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.erp-imza-fullscreen[hidden] {
  display: none !important;
}

.erp-imza-fullscreen-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.erp-imza-fullscreen-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 0.65rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  padding: 1rem 1rem 1.15rem;
}

.erp-imza-fullscreen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.erp-imza-fullscreen-body .erp-servis-imza-canvas-wrap {
  max-width: none;
}

.erp-imza-fullscreen-body .erp-servis-imza-canvas {
  width: auto;
  height: auto;
  max-width: 100%;
}

.erp-imza-fullscreen-hint {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #5a6b7d;
}

body.erp-imza-fullscreen-open {
  overflow: hidden;
}

.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 servis-form {
    size: A4;
    margin: 12mm 10mm;
  }

  html,
  .erp-servis-print-body {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .erp-servis-print-body {
    page: servis-form;
    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;
  }
}

/* ——— Kargo etiketi yazdırma (10×15 cm, A4'te 2 adet) ——— */
.erp-kargo-print-body {
  margin: 0;
  padding: 0;
  background: #e9ecef;
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
}

.erp-kargo-print-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  gap: 0.5rem;
}

.erp-kargo-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 1rem auto;
  padding: 5mm;
  box-sizing: border-box;
  background: #fff;
  display: grid;
  grid-template-columns: 100mm 100mm;
  column-gap: 10mm;
  align-content: start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.erp-kargo-label {
  width: 100mm;
  height: 150mm;
  box-sizing: border-box;
  border: 1.5px solid #222;
  padding: 4mm;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 9pt;
  line-height: 1.35;
}

.erp-kargo-label-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2mm;
  margin-bottom: 3mm;
  min-height: 6mm;
}

.erp-kargo-badge {
  font-size: 7pt;
  font-weight: 700;
  padding: 1mm 2mm;
  border: 1px solid #333;
  border-radius: 2px;
  white-space: nowrap;
}

.erp-kargo-badge-odeme {
  background: #f8f9fa;
}

.erp-kargo-badge-paket {
  background: #fff;
}

.erp-kargo-block {
  margin-bottom: 3mm;
}

.erp-kargo-block-title {
  font-size: 7pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  margin-bottom: 1mm;
}

.erp-kargo-unvan {
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 1mm;
  word-break: break-word;
}

.erp-kargo-alici-unvan {
  font-size: 11pt;
}

.erp-kargo-alici {
  flex: 1;
  border-top: 1px dashed #999;
  padding-top: 3mm;
  margin-top: 1mm;
}

.erp-kargo-satir {
  margin-bottom: 0.5mm;
  word-break: break-word;
}

.erp-kargo-ililce {
  font-weight: 700;
}

.erp-kargo-tel {
  font-weight: 600;
}

.erp-kargo-ref,
.erp-kargo-not {
  font-size: 7.5pt;
  margin-top: auto;
  padding-top: 2mm;
  border-top: 1px dotted #bbb;
  word-break: break-word;
}

.erp-kargo-not {
  font-style: italic;
}

@media print {
  @page kargo-label {
    size: A4 portrait;
    margin: 0;
  }

  .erp-kargo-print-body {
    page: kargo-label;
    background: #fff;
  }

  .erp-kargo-print-toolbar {
    display: none !important;
  }

  .erp-kargo-sheet {
    margin: 0;
    padding: 5mm;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }

  .erp-kargo-sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .erp-kargo-label {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Makine modeli BOM yazdırma */
.erp-model-bom-print-body {
  background: #f5f5f5;
  margin: 0;
  padding: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #111;
}

.erp-model-bom-print-toolbar {
  max-width: 210mm;
  margin: 0 auto 12px;
}

.erp-model-bom-print-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.erp-model-bom-print-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: #0d6efd;
  border-radius: 0.25rem;
}

.erp-model-bom-print-hint {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

.erp-model-bom-print {
  max-width: 210mm;
  margin: 0 auto;
  background: #fff;
  padding: 16mm 14mm;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

.erp-model-bom-print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10mm;
  padding-bottom: 4mm;
  border-bottom: 2px solid #222;
}

.erp-model-bom-logo {
  max-height: 48px;
  width: auto;
}

.erp-model-bom-print-meta {
  text-align: right;
}

.erp-model-bom-print-title {
  font-size: 11pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.erp-model-bom-print-model {
  font-size: 13pt;
  font-weight: 600;
  margin-top: 2mm;
}

.erp-model-bom-print-date {
  font-size: 9pt;
  color: #555;
  margin-top: 1mm;
}

.erp-model-bom-grup-baslik {
  font-size: 11pt;
  font-weight: 700;
  margin: 6mm 0 2mm;
  padding: 2mm 0;
  border-bottom: 1px solid #ccc;
}

.erp-model-bom-print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
  margin-bottom: 4mm;
}

.erp-model-bom-print-table th,
.erp-model-bom-print-table td {
  border: 1px solid #bbb;
  padding: 2mm 2.5mm;
  vertical-align: top;
}

.erp-model-bom-print-table th {
  background: #eee;
  font-weight: 700;
  text-align: left;
}

.erp-model-bom-print-table .col-no { width: 6%; text-align: center; }
.erp-model-bom-print-table .col-foto { width: 11%; text-align: center; vertical-align: middle; }
.erp-model-bom-print-table .col-seri { width: 16%; }
.erp-model-bom-print-table .col-parca { width: 18%; }
.erp-model-bom-print-table .col-miktar { width: 10%; text-align: right; }
.erp-model-bom-print-table .col-birim { width: 8%; }
.erp-model-bom-print-table .col-stok { width: 8%; text-align: right; }
.erp-model-bom-print-table .col-not { width: 28%; }

.erp-model-bom-print-table.has-foto .col-seri { width: 14%; }
.erp-model-bom-print-table.has-foto .col-parca { width: 16%; }
.erp-model-bom-print-table.has-foto .col-not { width: 22%; }

.erp-model-bom-print-foto {
  width: 14mm;
  height: 14mm;
  object-fit: cover;
  border-radius: 1mm;
  border: 1px solid #ccc;
  display: block;
  margin: 0 auto;
}

.erp-model-bom-parca-alt {
  display: block;
  font-size: 8pt;
  color: #555;
  margin-top: 0.5mm;
}

.erp-model-bom-editor .bom-parca-cell {
  vertical-align: middle;
}

.erp-model-bom-editor .bom-parca-cell-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.erp-model-bom-editor .bom-urun-etiket,
.erp-model-bom-editor .bom-parca-secim {
  flex: 1 1 auto;
  min-width: 0;
}

.erp-model-bom-editor .bom-parca-actions {
  flex: 0 0 4.75rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-top: 0.05rem;
}

.erp-model-bom-editor .bom-parca-actions .btn-link {
  text-align: left;
  padding-left: 0;
  padding-right: 0;
}

.erp-model-bom-editor .bom-urun-etiket {
  line-height: 1.35;
}

.erp-model-bom-editor .bom-urun-degistir,
.erp-model-bom-editor .bom-urun-detay,
.erp-model-bom-toolbar .btn-link,
.erp-model-bom-readonly .btn-link {
  --bs-btn-color: var(--button-color);
  --bs-btn-hover-color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 10%));
  color: var(--button-color) !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.erp-model-bom-editor .bom-urun-degistir:hover,
.erp-model-bom-editor .bom-urun-degistir:focus,
.erp-model-bom-editor .bom-urun-detay:hover,
.erp-model-bom-editor .bom-urun-detay:focus,
.erp-model-bom-toolbar .btn-link:hover,
.erp-model-bom-toolbar .btn-link:focus,
.erp-model-bom-readonly .btn-link:hover,
.erp-model-bom-readonly .btn-link:focus {
  color: hsl(var(--button-h), var(--button-s), calc(var(--button-l) - 10%)) !important;
}

.erp-model-bom-editor .select2-container {
  min-width: 100%;
}

.erp-model-bom-readonly .bom-parca-readonly-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.erp-model-bom-readonly .bom-parca-readonly-metin {
  flex: 1 1 auto;
  min-width: 0;
}

.erp-model-bom-readonly .bom-urun-detay {
  flex: 0 0 auto;
  white-space: nowrap;
}

.erp-model-bom-editor .bom-urun-detay:disabled,
.erp-model-bom-readonly .bom-urun-detay:disabled {
  opacity: 0.45;
  text-decoration: none;
  pointer-events: none;
}

.erp-bom-versiyon-table tbody tr.bom-versiyon-row-clickable {
  cursor: pointer;
}

.erp-bom-versiyon-table tbody tr.bom-versiyon-row-clickable:hover > td {
  background-color: rgba(13, 110, 253, 0.06);
}

.erp-bom-versiyon-table tbody tr.bom-versiyon-row-clickable:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.45);
  outline-offset: -2px;
}

.erp-bom-stok-kontrol-form .form-check {
  min-height: 1.25rem;
}

.erp-bom-stok-table th,
.erp-bom-stok-table td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.erp-bom-stok-grup:last-child {
  margin-bottom: 0 !important;
}

#uretimMalzemeModal .erp-uretim-malzeme-grup:last-child {
  margin-bottom: 0 !important;
}

#uretimMalzemeModal .erp-uretim-malzeme-table th,
#uretimMalzemeModal .erp-uretim-malzeme-table td {
  vertical-align: middle;
}

#uretimMalzemeModal .erp-uretim-malzeme-table .form-control {
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  width: 4.5rem;
}

#uretimMalzemeModal .erp-uretim-malzeme-grup .erp-sub-panel-head {
  font-size: 0.875rem;
}

#uretimMalzemeModal .erp-sub-panel > .erp-sub-panel-head:not(.erp-sub-panel-head-success):not(.erp-sub-panel-head-danger) {
  background: var(--navbar-color);
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

#uretimMalzemeModal .erp-sub-panel > .erp-sub-panel-head .erp-sub-panel-head-chevron {
  color: #fff;
  opacity: 0.85;
}

#uretimMalzemeModal .erp-sub-panel > .erp-sub-panel-head .text-muted {
  color: rgba(255, 255, 255, 0.78) !important;
}

#uretimMalzemeModal .erp-sub-panel > .erp-sub-panel-head .btn-outline-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

#uretimMalzemeModal .erp-sub-panel > .erp-sub-panel-head .btn-outline-secondary:hover,
#uretimMalzemeModal .erp-sub-panel > .erp-sub-panel-head .btn-outline-secondary:focus-visible {
  color: var(--navbar-color);
  background-color: #fff;
  border-color: #fff;
}

#uretimMalzemeModal .erp-uretim-malzeme-grup-head .erp-uretim-malzeme-grup-print {
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  align-self: stretch;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

.erp-makine-bom-sub-panel .erp-makine-bom-head .erp-makine-bom-edit {
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  align-self: stretch;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

.erp-uretim-malzeme-print-table .col-miktar,
.erp-uretim-malzeme-print-table .col-stok,
.erp-uretim-malzeme-print-table .col-eksik {
  width: 8%;
  text-align: right;
}

.erp-bom-stok-print-ozet {
  font-size: 9.5pt;
  margin: 0 0 4mm;
}

.erp-bom-stok-print-table {
  table-layout: fixed;
  width: 100%;
}

.erp-bom-stok-print-table th,
.erp-bom-stok-print-table td {
  font-size: 8pt;
  line-height: 1.25;
  padding: 1mm 1.2mm;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.erp-bom-stok-print-table .col-no {
  width: 4%;
  text-align: center;
  white-space: nowrap;
}

.erp-bom-stok-print-table .col-seri {
  width: 7%;
  word-break: break-word;
}

.erp-bom-stok-print-table .col-parca {
  width: 46%;
}

.erp-bom-stok-print-table .col-birim {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

.erp-bom-stok-print-table .col-stok {
  width: 5%;
  text-align: right;
  white-space: nowrap;
}

.erp-bom-stok-print-table .col-durum {
  width: 9%;
  white-space: nowrap;
}

.erp-bom-stok-print-table .col-sayim {
  width: 7%;
  min-width: 10mm;
}

.erp-bom-stok-print-table .col-not {
  width: 16%;
}

@media print {
  .erp-bom-stok-print-table .col-sayim {
    height: 6mm;
  }
}

body:not(.login-page):not(.portal-page) .erp-model-bom-editor thead th,
body:not(.login-page):not(.portal-page) thead.table-light th {
  background-color: var(--erp-section-head-bg);
  color: var(--erp-section-head-color);
  border-color: var(--erp-section-head-border);
}

.erp-model-bom-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--erp-panel-bg);
  border: 1px solid var(--erp-border, #dee2e6);
  border-radius: 0.375rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.erp-model-bom-toolbar-grup input {
  min-width: 220px;
  max-width: 280px;
}

.erp-model-bom-toolbar-expand {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.erp-model-bom-gruplar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.erp-model-bom-grup {
  border: 1px solid var(--erp-border, #dee2e6);
  border-radius: 0.375rem;
  background: var(--erp-panel-bg);
  overflow: hidden;
}

.erp-model-bom-grup > summary.erp-model-bom-grup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--erp-section-head-bg);
  border-bottom: 1px solid transparent;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.erp-model-bom-grup > summary.erp-model-bom-grup-head::-webkit-details-marker {
  display: none;
}

.erp-model-bom-grup > summary.erp-model-bom-grup-head::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.15rem;
  border-right: 2px solid #495057;
  border-bottom: 2px solid #495057;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.erp-model-bom-grup:not([open]) > summary.erp-model-bom-grup-head::before {
  transform: rotate(-135deg);
}

.erp-model-bom-grup[open] > summary.erp-model-bom-grup-head {
  border-bottom-color: var(--erp-border, #dee2e6);
}

.erp-model-bom-grup-head .bom-grup-baslik,
.erp-model-bom-grup-head .bom-grup-baslik-readonly {
  max-width: 280px;
  font-weight: 600;
}

.erp-model-bom-grup-head .bom-grup-baslik-readonly {
  max-width: none;
}

.erp-model-bom-grup-head .bom-grup-meta {
  white-space: nowrap;
}

.erp-model-bom-grup-body .table-responsive {
  padding: 0.5rem 0.75rem 0.75rem;
}

.erp-model-bom-grup-body > .bom-grup-bos {
  padding: 0 0.75rem 0.75rem;
}

@media print {
  .erp-model-bom-toolbar {
    display: none !important;
  }

  .erp-model-bom-print-body {
    background: #fff;
    padding: 0;
  }

  .erp-model-bom-print {
    box-shadow: none;
    max-width: none;
    padding: 0;
  }

  .erp-model-bom-print-toolbar {
    display: none !important;
  }
}

/* Teklif önizlemesi, A4 yazdırma kenar boşluklarını ekranda da kullanır. */
@media screen {
  body.erp-teklif-preview-embed { width: 210mm; margin: 0; padding: 12mm 10mm; box-sizing: border-box; }
  .erp-teklif-preview-embed .erp-teklif-print { width: 190mm; min-height: 271mm; }
}
