.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Side nav — Stitch / Industrial Precision */
.nav-side-link.active {
  background-color: #8b0000;
  color: #ff907f;
  font-weight: 600;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.nav-side-link.active:hover {
  background-color: #8b0000;
}

.nav-side-link.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e3beb8;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8e706b;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.animate-spinner {
  animation: spinner 0.8s linear infinite;
}

/* Number inputs — hide spinner arrows */
input[type="number"].no-spin::-webkit-outer-spin-button,
input[type="number"].no-spin::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"].no-spin {
  -moz-appearance: textfield;
  appearance: textfield;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, sans-serif;
}

/* JSON syntax highlight (ham props editörü) */
.json-editor {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  border: 1px solid #e3beb8;
  border-radius: 0.375rem;
  background: #f8f9fa;
  overflow: hidden;
}

.json-editor-hl,
.json-editor-input {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.625;
  white-space: pre;
  word-wrap: normal;
  overflow-wrap: normal;
  tab-size: 2;
  box-sizing: border-box;
}

.json-editor-hl {
  overflow: hidden;
  pointer-events: none;
  color: #191c1d;
  background: transparent;
}

.json-editor-input {
  overflow: auto;
  resize: none;
  color: transparent;
  caret-color: #191c1d;
  background: transparent;
  -webkit-text-fill-color: transparent;
}

.json-editor-input::selection {
  background: rgb(97 0 0 / 0.22);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.json-editor-input:focus {
  outline: none;
}

.json-key { color: #610000; font-weight: 600; }
.json-str { color: #904d00; }
.json-num { color: #5d002d; }
.json-lit { color: #1b5e20; font-weight: 600; }
.json-punct { color: #5a403c; }

/* Terminal script editor — viewport dolduran sayfa + kaydırılabilir overlay */
.script-page {
  /* SYS top bar (56px) + main padding (24px×2) */
  height: calc(100vh - 56px - 48px);
  min-height: 28rem;
}

.script-page-body {
  flex: 1 1 0%;
  min-height: 0;
}

.script-help {
  max-height: 100%;
}

.script-outline {
  max-height: 100%;
}

.script-monaco-host {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  background: #faf8f6;
  overflow: hidden;
}

.script-monaco-host .monaco-editor,
.script-monaco-host .overflow-guard {
  border-radius: 0.5rem;
}

/* legacy textarea highlight (unused by Monaco host; keep token colors for snippets) */
.script-editor-wrap {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  background: #faf8f6;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
}

.script-editor-highlight,
.script-editor-input {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  font: inherit;
  white-space: pre;
  word-wrap: normal;
  overflow-wrap: normal;
  tab-size: 2;
  box-sizing: border-box;
}

.script-editor-highlight {
  overflow: hidden;
  pointer-events: none;
  color: #1a1a1a;
  background: transparent;
  z-index: 0;
}

.script-editor-input {
  overflow: auto;
  resize: none;
  color: transparent;
  caret-color: #610000;
  background: transparent;
  -webkit-text-fill-color: transparent;
  z-index: 1;
  outline: none;
}

.script-editor-input::selection {
  background: rgb(97 0 0 / 0.22);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.scr-kw { color: #610000; font-weight: 600; }
.scr-sys { color: #1a4d6d; font-weight: 700; }
.scr-str { color: #904d00; }
.scr-num { color: #5d002d; }
.scr-cmt { color: #7a6a62; font-style: italic; }
.scr-punct { color: #5a403c; }

/* Ticari belge yazdırma görünümü (A4) */
.trade-print-sheet {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 12mm;
  background: #fff;
  color: #000;
  font-size: 11px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px #c9c4c3;
}

.trade-print-sheet table { width: 100%; border-collapse: collapse; }
.trade-print-sheet th, .trade-print-sheet td { border: 1px solid #555; padding: 3px 5px; }
.trade-print-sheet th { background: #eee; text-align: left; }
.trade-print-sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.trade-print-sheet .box { border: 1px solid #555; padding: 6px 8px; }
.trade-print-sheet .box h3 { margin: 0 0 3px; font-size: 10px; text-transform: uppercase; color: #444; }

.trade-print-watermark {
  position: absolute;
  top: 38%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 96px;
  font-weight: 700;
  letter-spacing: 8px;
  color: rgba(139, 0, 0, 0.12);
  transform: rotate(-24deg);
  pointer-events: none;
  user-select: none;
}

@media print {
  @page { size: A4; margin: 0; }
  header, aside, .no-print { display: none !important; }
  .h-screen, main, .overflow-hidden, .overflow-y-auto {
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .trade-print-sheet { box-shadow: none; margin: 0; width: 100%; }
}
