:root {
  --navy: #111827;
  --navy-soft: #1f2937;
  --bg: #f3f4f6;
  --card: #ffffff;
  --muted: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
}

body {
  background: var(--bg);
  color: #111827;
  font-family: Inter, Arial, sans-serif;
}

.erp-shell {
  align-items: stretch;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  width: 100%;
  overflow-x: hidden;
}

.erp-sidebar {
  background: var(--navy);
  color: #d1d5db;
  flex: 0 0 320px;
  max-width: 320px;
  min-width: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 320px;
}

.erp-main-content {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: hidden;
}

.erp-brand {
  color: white;
  font-size: 20px;
  font-weight: 800;
  overflow: hidden;
  padding: 22px 20px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-subtitle {
  color: #9ca3af;
  font-size: 12px;
  overflow: hidden;
  padding: 0 20px 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-nav-item {
  border-radius: 8px;
  color: #93a4b8;
  margin: 2px 10px;
  min-height: 36px;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-nav-item .q-btn__content {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-nav-item:hover {
  background: #263b5c;
  color: white;
}

.erp-nav-item-active {
  background: #2563eb !important;
  color: white !important;
  font-weight: 700;
  position: relative;
}

.erp-nav-item-active .q-btn__content,
.erp-nav-item-active .q-focus-helper,
.erp-nav-item-active span {
  color: white !important;
}

.erp-nav-item-active::before {
  background: #22d3ee;
  border-radius: 0 999px 999px 0;
  content: "";
  height: 30px;
  left: -10px;
  position: absolute;
  top: 3px;
  width: 4px;
}

.erp-nav-child {
  margin-left: 18px;
  width: calc(100% - 28px) !important;
}

.erp-nav-expansion {
  color: #d1d5db;
  margin: 4px 0;
}

.erp-nav-expansion .q-expansion-item__container > .q-item {
  color: #8fa3bc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  min-height: 38px;
  overflow: hidden;
  padding: 0 18px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.erp-nav-expansion .q-item__section,
.erp-nav-expansion .q-item__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-nav-expansion .q-expansion-item__container > .q-item:hover {
  background: #1b2b44;
  color: #dbeafe;
}

.erp-nav-section {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 16px 18px 6px;
  text-transform: uppercase;
}

.erp-topbar {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  height: 64px;
  min-width: 0;
  padding: 0 24px;
}

.erp-content {
  min-width: 0;
  overflow-x: hidden;
  padding: 24px;
}

.erp-card {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .055);
  min-width: 0;
  padding: 18px;
}

.erp-page-title {
  font-size: 24px;
  font-weight: 800;
}

.erp-page-caption {
  color: var(--muted);
  margin-top: 4px;
}

.erp-metric-label {
  color: var(--muted);
  font-size: 13px;
}

.erp-metric-value {
  font-size: 28px;
  font-weight: 800;
  margin-top: 8px;
}

.badge-high {
  background: #fee2e2;
  color: var(--danger);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

.badge-normal {
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

.erp-table .q-table thead tr {
  background: #f3f4f6;
}

.erp-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
  width: 100%;
}

.erp-table-scroll .q-table__container {
  min-width: 100%;
}

.erp-cari-table .q-table,
.erp-cari-table table {
  min-width: 990px;
}

.erp-stok-table .q-table,
.erp-stok-table table {
  min-width: 1070px;
}

.erp-hareket-table .q-table,
.erp-hareket-table table {
  min-width: 1180px;
}

.erp-kumas-top-table .q-table,
.erp-kumas-top-table table {
  min-width: 1120px;
}

.erp-fason-table .q-table,
.erp-fason-table table,
.erp-kesim-table .q-table,
.erp-kesim-table table {
  min-width: 1210px;
}

.erp-uretim-table .q-table,
.erp-uretim-table table {
  min-width: 1080px;
}

.erp-table .q-table th {
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  height: 42px;
  overflow: visible;
  text-transform: uppercase;
  white-space: nowrap;
}

.erp-table .q-table th .q-table__sort-icon,
.erp-table .q-table th .q-table__sort-icon--left {
  flex-shrink: 0;
}

.erp-table .q-table th,
.erp-table .q-table th * {
  text-overflow: clip;
  white-space: nowrap;
}

.erp-table .q-table td {
  height: 46px;
  vertical-align: middle;
}

.erp-table .q-btn {
  min-height: 28px;
  white-space: nowrap;
}

.erp-table th:last-child,
.erp-table td:last-child {
  background: white;
  min-width: 130px;
  position: sticky;
  right: 0;
  text-align: center;
  width: 130px;
  z-index: 2;
}

.erp-table th:last-child {
  background: #f3f4f6;
  z-index: 3;
}

.erp-cari-table th:nth-child(1),
.erp-cari-table td:nth-child(1) {
  min-width: 130px;
  width: 130px;
}

.erp-cari-table th:nth-child(2),
.erp-cari-table td:nth-child(2) {
  min-width: 240px;
  width: 240px;
}

.erp-cari-table th:nth-child(3),
.erp-cari-table td:nth-child(3) {
  min-width: 120px;
  width: 120px;
}

.erp-cari-table th:nth-child(4),
.erp-cari-table td:nth-child(4) {
  min-width: 150px;
  width: 150px;
}

.erp-cari-table th:nth-child(5),
.erp-cari-table td:nth-child(5) {
  min-width: 110px;
  width: 110px;
}

.erp-cari-table th:nth-child(6),
.erp-cari-table td:nth-child(6) {
  min-width: 130px;
  width: 130px;
}

.erp-stok-table th:nth-child(1),
.erp-stok-table td:nth-child(1) {
  min-width: 150px;
  width: 150px;
}

.erp-stok-table th:nth-child(2),
.erp-stok-table td:nth-child(2) {
  min-width: 280px;
  width: 280px;
}

.erp-stok-table th:nth-child(3),
.erp-stok-table td:nth-child(3) {
  min-width: 140px;
  width: 140px;
}

.erp-stok-table th:nth-child(4),
.erp-stok-table td:nth-child(4) {
  min-width: 130px;
  width: 130px;
}

.erp-stok-table th:nth-child(5),
.erp-stok-table td:nth-child(5) {
  min-width: 130px;
  width: 130px;
}

.erp-stok-table th:nth-child(6),
.erp-stok-table td:nth-child(6) {
  min-width: 130px;
  width: 130px;
}

.erp-hareket-table th:nth-child(1),
.erp-hareket-table td:nth-child(1) {
  min-width: 120px;
  width: 120px;
}

.erp-hareket-table th:nth-child(2),
.erp-hareket-table td:nth-child(2) {
  min-width: 140px;
  width: 140px;
}

.erp-hareket-table th:nth-child(3),
.erp-hareket-table td:nth-child(3) {
  min-width: 220px;
  width: 220px;
}

.erp-hareket-table th:nth-child(4),
.erp-hareket-table td:nth-child(4) {
  min-width: 130px;
  width: 130px;
}

.erp-hareket-table th:nth-child(5),
.erp-hareket-table td:nth-child(5) {
  min-width: 140px;
  width: 140px;
}

.erp-hareket-table th:nth-child(6),
.erp-hareket-table td:nth-child(6),
.erp-hareket-table th:nth-child(7),
.erp-hareket-table td:nth-child(7) {
  min-width: 90px;
  width: 90px;
}

.erp-hareket-table th:nth-child(8),
.erp-hareket-table td:nth-child(8) {
  min-width: 350px;
  width: 350px;
}

.erp-kesim-table th:nth-child(1),
.erp-kesim-table td:nth-child(1) {
  min-width: 160px;
  width: 160px;
}

.erp-kesim-table th:nth-child(2),
.erp-kesim-table td:nth-child(2) {
  min-width: 180px;
  width: 180px;
}

.erp-kesim-table th:nth-child(3),
.erp-kesim-table td:nth-child(3) {
  min-width: 110px;
  width: 110px;
}

.erp-kesim-table th:nth-child(4),
.erp-kesim-table td:nth-child(4) {
  min-width: 130px;
  width: 130px;
}

.erp-kesim-table th:nth-child(5),
.erp-kesim-table td:nth-child(5) {
  min-width: 150px;
  width: 150px;
}

.erp-kesim-table th:nth-child(6),
.erp-kesim-table td:nth-child(6),
.erp-kesim-table th:nth-child(7),
.erp-kesim-table td:nth-child(7) {
  min-width: 130px;
  width: 130px;
}

.erp-kesim-table th:nth-child(8),
.erp-kesim-table td:nth-child(8) {
  min-width: 110px;
  width: 110px;
}

.erp-uretim-table th:nth-child(1),
.erp-uretim-table td:nth-child(1) {
  min-width: 160px;
  width: 160px;
}

.erp-uretim-table th:nth-child(2),
.erp-uretim-table td:nth-child(2) {
  min-width: 130px;
  width: 130px;
}

.erp-uretim-table th:nth-child(3),
.erp-uretim-table td:nth-child(3) {
  min-width: 200px;
  width: 200px;
}

.erp-uretim-table th:nth-child(4),
.erp-uretim-table td:nth-child(4) {
  min-width: 130px;
  width: 130px;
}

.erp-uretim-table th:nth-child(5),
.erp-uretim-table td:nth-child(5) {
  min-width: 120px;
  width: 120px;
}

.erp-uretim-table th:nth-child(6),
.erp-uretim-table td:nth-child(6) {
  min-width: 130px;
  width: 130px;
}

.erp-uretim-table th:nth-child(7),
.erp-uretim-table td:nth-child(7) {
  min-width: 130px;
  width: 130px;
}

.erp-page-actions {
  align-items: center;
  gap: 16px;
  margin-bottom: -4px;
}

.erp-calc-panel {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  gap: 10px;
  padding: 12px;
}

.erp-calc-value {
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.erp-calc-label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.erp-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 10px;
}

.erp-badge-blue {
  background: #bfdbfe;
  color: #1e40af;
}

.erp-badge-red {
  background: #fecaca;
  color: #991b1b;
}

.erp-badge-orange {
  background: #fed7aa;
  color: #9a3412;
}

.erp-badge-green {
  background: #bbf7d0;
  color: #166534;
}

.erp-modal-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  max-height: 90vh;
  overflow: hidden;
  padding: 18px;
}

.erp-modal-header {
  flex-shrink: 0;
}

.erp-modal-body {
  max-height: calc(90vh - 155px);
  overflow-y: auto;
  padding-right: 4px;
}

.erp-kesim-modal-card {
  max-height: 92vh;
  overflow: hidden;
  padding: 0;
}

.erp-kesim-modal-body {
  max-height: calc(92vh - 86px);
  overflow-y: auto;
  padding: 18px 18px 0;
}

.erp-kesim-modal-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  bottom: 0;
  flex-shrink: 0;
  padding: 12px 18px;
  position: sticky;
  z-index: 5;
}

.erp-detail-main-grid {
  align-items: start;
}

.erp-stock-hero {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
}

.erp-detail-section {
  background: #ffffff;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  gap: 10px;
  padding: 12px;
}

.erp-section-title {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.erp-info-tile {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  gap: 4px;
  min-height: 68px;
  padding: 10px;
}

.erp-info-label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.erp-info-value {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.erp-process-grid {
  align-items: stretch;
}

.erp-process-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: none;
  gap: 10px;
  padding: 14px;
}

.erp-report-page {
  background: #f3f4f6;
  min-height: 100vh;
  padding: 12px;
}

.erp-report-toolbar {
  margin: 0 auto 8px;
  max-width: 210mm;
}

.erp-report-shell {
  margin: 0 auto;
  max-width: 210mm;
}

.erp-report-sheet {
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  box-sizing: border-box;
  min-height: auto;
  padding: 8mm 8mm 7mm;
}

.erp-report-title-row {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}

.erp-report-kicker {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.erp-report-main-title {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.erp-report-main-title--sm {
  font-size: 18px;
}

.erp-report-subtitle,
.erp-report-meta {
  color: #4b5563;
  font-size: 11px;
  font-weight: 600;
}

.erp-report-status {
  background: #e0f2fe;
  border-radius: 999px;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
}

.erp-report-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  padding: 9px;
  page-break-inside: avoid;
}

.erp-report-section-title {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.erp-report-subsection-title {
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.erp-report-info-box {
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  min-height: 42px;
  padding: 6px 8px;
}

.erp-report-info-label {
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.erp-report-info-value {
  color: #111827;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}

.erp-report-model-grid {
  grid-template-columns: 30mm minmax(0, 1fr);
  align-items: start;
}

.erp-report-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-report-metric-row .erp-report-info-box {
  min-height: 34px;
}

.erp-report-media-box {
  min-width: 0;
}

.erp-report-media-placeholder {
  align-items: center;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 28mm;
  padding: 8px;
  text-align: center;
}

.erp-report-media-image {
  border-radius: 8px;
  max-height: 28mm;
  object-fit: cover;
  width: 100%;
}

.erp-report-media-title {
  color: #111827;
  font-size: 11px;
  font-weight: 800;
}

.erp-report-media-caption {
  color: #6b7280;
  font-size: 9px;
  margin-top: 3px;
}

.erp-report-mini-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 7px 8px;
  page-break-inside: avoid;
}

.erp-report-mini-title {
  color: #111827;
  font-size: 11px;
  font-weight: 800;
}

.erp-report-mini-subtitle {
  color: #6b7280;
  font-size: 9px;
  font-weight: 600;
  margin-top: 1px;
}

.erp-report-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  white-space: nowrap;
}

.erp-report-badge-green {
  background: #dcfce7;
  color: #166534;
}

.erp-report-badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.erp-report-badge-gray {
  background: #e5e7eb;
  color: #374151;
}

.erp-report-table .q-table thead tr {
  background: #f9fafb;
}

.erp-report-table {
  overflow: hidden;
}

.erp-report-table .q-table__container,
.erp-report-table .q-table__middle {
  overflow-x: hidden !important;
}

.erp-report-table .q-table__middle table {
  table-layout: fixed;
  width: 100%;
}

.erp-report-table .q-table th {
  color: #374151;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-report-table .q-table td {
  font-size: 10px;
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: normal;
}

.erp-report-table .q-table tbody td {
  border-top: 1px solid #edf2f7;
}

.erp-report-table--compact .q-table th,
.erp-report-table--compact .q-table td {
  padding-left: 5px;
  padding-right: 5px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.erp-report-compact-metrics .erp-report-info-box {
  min-height: 34px;
}

.erp-report-table .q-table th:last-child,
.erp-report-table .q-table td:last-child {
  position: static;
  min-width: auto;
  text-align: right;
  width: auto;
}

.erp-report-table .q-table th:nth-child(1),
.erp-report-table .q-table td:nth-child(1) {
  width: 22%;
}

.erp-report-table .q-table th:nth-child(2),
.erp-report-table .q-table td:nth-child(2) {
  width: 20%;
}

.erp-report-table .q-table th:nth-child(3),
.erp-report-table .q-table td:nth-child(3) {
  width: 16%;
}

.erp-report-table .q-table th:nth-child(4),
.erp-report-table .q-table td:nth-child(4) {
  width: 12%;
}

.erp-report-table .q-table th:nth-child(5),
.erp-report-table .q-table td:nth-child(5) {
  width: 14%;
}

.erp-report-table .q-table th:nth-child(6),
.erp-report-table .q-table td:nth-child(6) {
  width: 16%;
}

.erp-report-table .q-table th:nth-child(3),
.erp-report-table .q-table td:nth-child(3),
.erp-report-table .q-table th:nth-child(4),
.erp-report-table .q-table td:nth-child(4),
.erp-report-table .q-table th:nth-child(5),
.erp-report-table .q-table td:nth-child(5),
.erp-report-table .q-table th:nth-child(6),
.erp-report-table .q-table td:nth-child(6) {
  text-align: right;
}

.erp-report-sign-box {
  padding-top: 4px;
}

.erp-report-sign-label {
  color: #374151;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 18px;
}

.erp-report-footnote {
  color: #6b7280;
  font-size: 10px;
  line-height: 1.35;
}

.erp-report-kesim-grid .erp-report-info-box {
  min-height: 34px;
}

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  html, body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .no-print {
    display: none !important;
  }

  .erp-report-page {
    background: white;
    padding: 0;
  }

  .erp-report-toolbar {
    display: none !important;
  }

  .erp-shell,
  .erp-sidebar,
  .erp-topbar,
  .erp-content {
    display: none !important;
  }

  .erp-report-shell {
    margin: 0;
    max-width: none;
  }

  .erp-report-sheet {
    border: none;
    box-shadow: none;
    box-sizing: border-box;
    min-height: auto;
    padding: 0;
    width: 100%;
  }

  .erp-report-card,
  .erp-report-info-box,
  .erp-report-mini-card,
  .erp-report-table {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .erp-report-table,
  .erp-report-table .q-table,
  .erp-report-table .q-table__container,
  .erp-report-table .q-table__middle {
    overflow-x: hidden !important;
  }

  .erp-report-table .q-table {
    break-inside: auto;
    page-break-inside: auto;
  }

  .erp-report-media-placeholder {
    min-height: 24mm;
  }

  .erp-report-media-image {
    max-height: 24mm;
  }
}
