/* ============================================================
   ÜRETIM TAKIP - COMPONENT STYLES
   ============================================================ */

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--t-fast);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: var(--r-lg); }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--green);
  color: #000;
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-primary:active { transform: scale(0.96); }

.btn-secondary {
  background: var(--bg-700);
  color: var(--text-300);
  border-color: var(--card-border);
}
.btn-secondary:hover { background: var(--bg-600); color: var(--text-100); }

.btn-danger {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.btn-danger:hover { background: var(--red-dark); }

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green-dim); }

.btn-ghost {
  background: transparent;
  color: var(--text-400);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-700); color: var(--text-100); }

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--bg-700);
  color: var(--text-400);
  border: 1px solid var(--card-border);
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-600); color: var(--text-100); }
.btn-icon:active { transform: scale(0.9); }
.btn-icon svg { width: 18px; height: 18px; }

/* ---- CARDS ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-fast);
}

.card-hover:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.card-body { padding: 16px; }
.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--card-border);
  background: rgba(0,0,0,0.15);
}

/* ---- FORMS ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-300);
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  background: var(--bg-800);
  border: 1.5px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text-100);
  transition: all var(--t-fast);
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-600); }

.form-input:focus {
  border-color: var(--green);
  background: rgba(30, 41, 59, 1);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.form-input.has-icon { padding-left: 42px; }
.form-input.has-suffix { padding-right: 44px; }

.form-input.error { border-color: var(--red); }
.form-input.error:focus { box-shadow: 0 0 0 3px var(--red-dim); }

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-600);
  margin-top: 2px;
}

.form-error-msg {
  font-size: 12px;
  color: var(--red);
  margin-top: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Input with icon */
.input-icon-wrap { position: relative; }

.input-prefix-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-600);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-prefix-icon svg { width: 18px; height: 18px; }

.input-suffix-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-400);
  border-radius: var(--r-sm);
  transition: color var(--t-fast);
}
.input-suffix-btn:hover { color: var(--text-100); }
.input-suffix-btn svg { width: 18px; height: 18px; }

/* ---- BADGES / TAGS ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-transform: uppercase;
}

.badge-acil { background: var(--red-dim); color: #FCA5A5; border: 1px solid rgba(239,68,68,0.3); }
.badge-normal { background: var(--blue-dim); color: #93C5FD; border: 1px solid rgba(59,130,246,0.3); }
.badge-dusuk { background: var(--bg-700); color: var(--text-400); border: 1px solid var(--card-border); }

.badge-bekliyor { background: var(--amber-dim); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }
.badge-devam { background: var(--blue-dim); color: #93C5FD; border: 1px solid rgba(59,130,246,0.3); }
.badge-tamamlandi { background: var(--green-dim); color: #6EE7B7; border: 1px solid rgba(34,197,94,0.3); }

.badge-yonetici { background: var(--purple-dim); color: #C4B5FD; border: 1px solid rgba(139,92,246,0.3); }
.badge-usta { background: var(--amber-dim); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }

/* ---- TABS ---- */
.tabs {
  display: flex;
  background: var(--bg-800);
  border-radius: var(--r-lg);
  padding: 4px;
  gap: 2px;
  margin-bottom: 16px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-400);
  transition: all var(--t-fast);
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--bg-700);
  color: var(--text-100);
}

.tab-count {
  background: var(--bg-600);
  color: var(--text-300);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-weight: 700;
}

.tab-btn.active .tab-count {
  background: var(--green);
  color: black;
}

/* ---- PROGRESS BAR ---- */
.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar {
  height: 6px;
  background: var(--bg-700);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  transition: width 0.5s ease;
}

.progress-fill.complete { background: linear-gradient(90deg, var(--green-dark), #34D399); }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-400);
  font-weight: 500;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.empty-icon { font-size: 52px; opacity: 0.6; line-height: 1; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--text-300); }
.empty-desc { font-size: 13px; color: var(--text-600); max-width: 240px; line-height: 1.5; }

/* ---- LISTS ---- */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  gap: 12px;
  transition: background var(--t-fast);
}

.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--bg-700); }

.list-item-left { flex: 1; min-width: 0; }
.list-item-title { font-size: 14px; font-weight: 600; color: var(--text-100); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-subtitle { font-size: 12px; color: var(--text-400); margin-top: 2px; }

.list-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ---- MODAL ---- */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  padding: 0;
  animation: fadeIn 0.2s ease;
}

#modal-overlay.center-modal { align-items: center; padding: 16px; }

#modal-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-800);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  overflow: hidden;
  animation: slideUp 0.3s ease;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}

#modal-overlay.center-modal #modal-container {
  border-radius: var(--r-xl);
  max-height: 90dvh;
}

#modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

#modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-100);
  letter-spacing: -0.01em;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--text-400);
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.modal-close-btn:hover { background: var(--bg-700); color: var(--text-100); }
.modal-close-btn svg { width: 18px; height: 18px; }

#modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* ---- CONFIRM DIALOG ---- */
#confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

#confirm-container {
  background: var(--bg-800);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  animation: slideUp 0.25s ease;
}

.confirm-icon-wrap { font-size: 44px; margin-bottom: 16px; }

#confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 8px;
}

#confirm-message {
  font-size: 14px;
  color: var(--text-400);
  margin-bottom: 24px;
  line-height: 1.5;
}

.confirm-buttons {
  display: flex;
  gap: 10px;
}

.confirm-buttons .btn { flex: 1; }

/* ---- TOAST ---- */
#toast-container {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  right: 12px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-800);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease forwards;
  pointer-events: all;
  max-width: 100%;
  min-width: 200px;
}

.toast.removing { animation: toastOut 0.3s ease forwards; }

.toast-icon { font-size: 18px; flex-shrink: 0; line-height: 1; margin-top: 1px; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 700; color: var(--text-100); line-height: 1.3; }
.toast-message { font-size: 12px; color: var(--text-400); margin-top: 2px; line-height: 1.4; }

.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-warning { border-left: 3px solid var(--amber); }
.toast-info { border-left: 3px solid var(--blue); }

/* ---- PRODUCTION CARD ---- */
.production-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-fast);
  margin-bottom: 12px;
}

.production-card.priority-acil {
  border-left: 3px solid var(--red);
}
.production-card.priority-normal {
  border-left: 3px solid var(--blue);
}
.production-card.priority-dusuk {
  border-left: 3px solid var(--text-600);
}
.production-card.completed {
  border-left: 3px solid var(--green);
  opacity: 0.75;
}

.prod-card-header {
  padding: 14px 16px 10px;
  cursor: pointer;
  user-select: none;
}

.prod-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.prod-no {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-400);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.04em;
}

.prod-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.prod-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-100);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.prod-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-400);
}

.prod-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prod-progress-wrap {
  padding: 0 16px 14px;
}

.prod-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-400);
  transition: transform var(--t-fast);
  flex-shrink: 0;
}

.production-card.expanded .prod-chevron { transform: rotate(180deg); }

/* Stage List */
.stage-list {
  border-top: 1px solid var(--card-border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.2s ease;
}

.stage-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--bg-800);
  border: 1px solid var(--card-border);
  transition: all var(--t-fast);
  cursor: pointer;
  user-select: none;
}

.stage-item.completed {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.2);
  cursor: default;
}

.stage-item.next {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.06);
}

.stage-item:not(.completed):not(.locked):active {
  transform: scale(0.98);
  background: var(--bg-700);
}

.stage-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.stage-checkbox {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  border: 2px solid var(--bg-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  transition: all var(--t-fast);
  margin-top: 1px;
}

.stage-item.completed .stage-checkbox {
  background: var(--green);
  border-color: var(--green);
  animation: checkPop 0.3s ease;
}

.stage-item.next .stage-checkbox {
  border-color: var(--blue);
}

.stage-info { flex: 1; min-width: 0; }
.stage-name { font-size: 14px; font-weight: 600; color: var(--text-100); }
.stage-item.completed .stage-name { color: var(--text-400); }

.stage-detail {
  font-size: 11px;
  color: var(--text-600);
  margin-top: 3px;
  line-height: 1.4;
}

.stage-done-by {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  margin-top: 3px;
}

.stage-sira {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-600);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
  margin-top: 5px;
}

/* Tamamla Butonu */
.prod-action-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--card-border);
  background: rgba(0,0,0,0.15);
}

/* ---- STATS CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 16px;
  text-align: center;
}

.stat-icon { font-size: 26px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-100); letter-spacing: -0.04em; }
.stat-label { font-size: 12px; color: var(--text-400); font-weight: 500; margin-top: 3px; }
.stat-green .stat-value { color: var(--green); }
.stat-amber .stat-value { color: var(--amber); }
.stat-blue .stat-value { color: var(--blue); }
.stat-red .stat-value { color: var(--red); }

/* ---- SECTION HEADER ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- MORE MENU ---- */
.more-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.more-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  transition: all var(--t-fast);
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.more-menu-item:hover, .more-menu-item:active {
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
}

.more-menu-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.more-menu-text { flex: 1; min-width: 0; }
.more-menu-title { font-size: 15px; font-weight: 600; color: var(--text-100); }
.more-menu-desc { font-size: 12px; color: var(--text-400); margin-top: 2px; }

.more-menu-arrow {
  color: var(--text-600);
  font-size: 18px;
  flex-shrink: 0;
}

/* ---- SKELETON LOADING ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-700) 25%, var(--bg-600) 50%, var(--bg-700) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
}

/* ---- CHIP FILTER ---- */
.chip-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.chip-filter::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-800);
  border: 1px solid var(--card-border);
  color: var(--text-400);
  white-space: nowrap;
  transition: all var(--t-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.chip.active {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
}

.chip:active { transform: scale(0.94); }

/* ---- INFO ROW ---- */
.info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
}

.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-400); font-weight: 500; }
.info-value { color: var(--text-100); font-weight: 600; text-align: right; }

/* ---- DIVIDER ---- */
.divider {
  height: 1px;
  background: var(--card-border);
  margin: 12px 0;
}

/* ---- MATERIAL ITEMS (Üretim kartı içi) ---- */
.material-list {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.material-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--bg-800);
  border: 1px solid var(--card-border);
  transition: all var(--t-fast);
}

.material-item.material-done {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(34, 197, 94, 0.2);
}

.material-item.material-ikame {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
}

.material-status-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.status-ok {
  background: var(--green-dim);
  color: var(--green);
  border: 1.5px solid rgba(34, 197, 94, 0.4);
}

.status-ikame {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
}

.status-bekliyor {
  background: var(--bg-700);
  color: var(--text-600);
  border: 1.5px solid var(--card-border);
}

.material-body {
  flex: 1;
  min-width: 0;
}

.material-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-100);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.4;
}

.material-item.material-done .material-name { color: var(--text-300); }

.material-meta {
  font-size: 12px;
  color: var(--text-400);
  margin-top: 3px;
  line-height: 1.5;
}

.material-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.material-edit-btn {
  color: var(--text-400);
  font-size: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  background: var(--bg-700);
  transition: all var(--t-fast);
}

.material-edit-btn:hover { background: var(--bg-600); color: var(--text-100); }

.material-use-btn {
  font-size: 13px;
  height: 36px;
  padding: 0 12px;
}

.material-hint {
  padding: 8px 14px 12px;
  font-size: 11px;
  color: var(--text-600);
  text-align: center;
  line-height: 1.5;
}

/* ---- INNER TABS (Üretim kartı içi aşama/malzeme sekmeleri) ---- */
.prod-inner-tabs {
  display: flex;
  background: var(--bg-700);
  border-radius: 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  overflow: hidden;
}

.prod-inner-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-500);
  transition: all var(--t-fast);
  border-right: 1px solid var(--card-border);
  white-space: nowrap;
}

.prod-inner-tab:last-child { border-right: none; }

.prod-inner-tab.active {
  background: var(--bg-800);
  color: var(--text-100);
}

.prod-inner-tab .tab-count {
  background: var(--bg-600);
  color: var(--text-400);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: var(--r-full);
}

.prod-inner-tab.active .tab-count {
  background: var(--green);
  color: black;
}

/* ---- BADGE AMBER (Yarı mamül için) ---- */
.badge-amber { background: var(--amber-dim); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }

/* ---- BADGE BİRLEŞİK ---- */
.badge-birlesik { background: rgba(139,92,246,0.15); color: #A78BFA; border: 1px solid rgba(139,92,246,0.3); }

/* ---- Birleştirilen Kart ---- */
.birlesik-card { border-color: rgba(139,92,246,0.35) !important; }
.birlesik-card .prod-no { color: #A78BFA; }

/* ---- Kaynak Emir Kilit Banner'ı ---- */
.locked-source-banner {
  margin: 0;
  padding: 9px 14px;
  background: rgba(245,158,11,0.08);
  border-bottom: 1px solid rgba(245,158,11,0.2);
  font-size: 12px;
  color: var(--amber);
  line-height: 1.5;
}


/* ---- Birleştirildi Referans Badge (kaynak emirlerde) ---- */
.merge-ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--r-full);
  padding: 1px 8px;
  font-weight: 600;
}

/* ---- Merge Mode Kartlar ---- */
.merge-selectable { cursor: pointer; }
.merge-selectable:hover { border-color: rgba(59,130,246,0.5) !important; }

.merge-selected {
  border-color: var(--blue) !important;
  background: rgba(59,130,246,0.06) !important;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.merge-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.merge-checkbox {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  transition: all var(--t-fast);
  margin-right: 4px;
}

.merge-checkbox.checked {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

/* ---- Merge Action Bar (floating) ---- */
.merge-action-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-700);
  border: 1px solid var(--blue);
  border-radius: var(--r-xl);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(59,130,246,0.2);
  z-index: 200;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  animation: slideUp 0.2s ease-out;
}

.merge-action-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-100);
}

/* ---- Prod Toolbar ---- */
#prod-toolbar {
  margin-bottom: 10px;
}

.merge-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(59,130,246,0.08);
  border: 1.5px solid rgba(59,130,246,0.3);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  animation: fadeIn 0.15s ease-out;
}

.merge-toolbar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.merge-toolbar-cnt {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-100);
}

.merge-toolbar-urun {
  font-size: 11px;
  color: var(--blue);
  font-weight: 600;
}

.merge-toolbar-hint {
  font-size: 11px;
  color: var(--text-500);
}

.merge-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}



/* ---- UTILS ---- */
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-400); }
.hidden { display: none !important; }
.user-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: black;
  margin: 0 auto;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* ---- ACCORDION ---- */
.accordion-item {
  border-bottom: 1px solid var(--card-border);
}
.accordion-item:last-child { border-bottom: none; }

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background var(--t-fast);
}
.accordion-header:hover { background: var(--bg-700); }

.accordion-body { padding: 0 16px 14px; }

/* Roles */
.role-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.role-yonetici { background: var(--purple); }
.role-usta { background: var(--amber); }

/* ---- SEARCH BAR ---- */
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-800);
  border: 1.5px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 0 14px;
  gap: 10px;
  margin-bottom: 14px;
  transition: border-color var(--t-fast);
}
.search-wrap:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px rgba(34,197,94,0.15); }
.search-icon { font-size: 16px; flex-shrink: 0; pointer-events: none; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-100);
  min-width: 0;
}
.search-input::placeholder { color: var(--text-600); }
.search-clear {
  background: none;
  border: none;
  color: var(--text-400);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast);
}
.search-clear:hover { color: var(--text-100); }

/* ---- SEARCHABLE SELECT ---- */
.ss-wrap { position: relative; }
.ss-input-row { position: relative; }
.ss-input { padding-right: 36px !important; cursor: text; }
.ss-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-400);
  font-size: 12px;
  cursor: pointer;
  pointer-events: all;
  padding: 4px;
  user-select: none;
}
.ss-dropdown {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  background: var(--bg-700);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  z-index: 600;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  -webkit-overflow-scrolling: touch;
}
.ss-option {
  padding: 11px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-100);
  transition: background var(--t-fast);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ss-option:last-child { border-bottom: none; }
.ss-option:hover { background: var(--bg-600); }
.ss-option.ss-selected { background: var(--green-dim); color: var(--green); }
.ss-option.ss-empty { color: var(--text-400); cursor: default; font-size: 13px; }
.ss-option.ss-empty:hover { background: none; }
.ss-sub { font-size: 11px; color: var(--text-400); white-space: nowrap; }
.ss-label { flex: 1; min-width: 0; }

/* Badge amber (eklenmemişse) */
.badge-amber { background: var(--amber-dim); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }
