/*
  ____                       _                     
 |  _ \ ___  __ _  ___ _ __ (_) ___  _   _ ___     
 | |_) / _ \/ _` |/ __| '_ \| |/ _ \| | | / __|    
 |  _ <  __/ (_| | (__| | | | | (_) | |_| \__ \    
 |_| \_\___|\__,_|\___|_| |_|_|\___/ \__,_|___/    
                                 crafted by HaydayDunyasi
*/
/* Genel görünüm */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #1f2933;
  background: #0b1020;
}

/* Arkadaki büyük gradient */
.bg-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, #ffce67 0, transparent 50%),
    radial-gradient(circle at bottom right, #8be7ff 0, transparent 55%);
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  color: #f9fafb;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #facc15, #fb923c);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 120%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  animation: float 3s ease-in-out infinite;
  position: relative;
  color: #112037;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.logo::after {
  content: "H";
  font-size: 22px;
  letter-spacing: 0.5px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-block h1 {
  margin: 0;
  font-size: 24px;
}

.title-block {
  flex: 1;
}

.center-brand {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 25px;
  letter-spacing: 1.1px;
  background: linear-gradient(90deg, #faae2b, #ffd873, #f9a826);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  /* Mobilde animasyon yok veya çok hafif */
}

/* Sadece Masaüstünde (PC) Hassas Kayma Animasyonu */
@media (min-width: 1024px) {
  .center-brand {
    font-size: 32px;
    /* Daha büyük ve okunaklı */
    letter-spacing: 2px;
    animation: slidingBrand 6s ease-in-out infinite alternate;
  }
}

@keyframes slidingBrand {
  0% {
    /* Sola, 'kaydet.' yazısına kadar gitmesi için mesafeyi artırdık */
    transform: translateX(-450px);
  }

  100% {
    /* Sağa, TR bayrağına değmeyecek kadar (mevcut ayar iyi) */
    transform: translateX(260px);
  }
}

.brand-badge {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: #fefce8;
  background: linear-gradient(135deg, rgba(248, 181, 0, 0.25), rgba(34, 197, 235, 0.25));
  border: 1px solid rgba(248, 181, 0, 0.6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.brand-marquee {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin-left: 24px;
  margin-right: 12px;
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(248, 181, 0, 0.14), rgba(34, 197, 235, 0.12));
  border: 1px solid rgba(248, 181, 0, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  position: relative;
}

.brand-marquee span {
  display: block;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, #f8d66d, #8be7ff, #f9a826);
  -webkit-background-clip: text;
  color: transparent;
  animation: marqueeSlide 8s linear infinite;
  white-space: nowrap;
}

.brand-marquee::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  animation: sheen 3.5s ease-in-out infinite;
}

@keyframes marqueeSlide {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

.brand-marquee-rail {
  flex: 1;
  margin-left: 16px;
  margin-right: 16px;
  min-width: 220px;
  max-width: 520px;
  height: 48px;
  border: none;
  background: transparent;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.brand-marquee-rail::after {
  content: none;
}

.brand-marquee-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 12px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.8px;
  background: linear-gradient(90deg, #f8d66d, #8be7ff, #f9a826);
  -webkit-background-clip: text;
  color: transparent;
  animation: marqueeLong 7s linear infinite;
}

.brand-marquee-track span {
  display: inline-block;
}

@keyframes marqueeLong {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  .brand-marquee-rail {
    display: none;
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.title-block p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #cbd5f5;
}

.language-switch {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.65);
  color: #f9fafb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.flag-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.6);
  border-color: rgba(248, 181, 0, 0.6);
}

.flag-btn.active {
  border-color: rgba(248, 181, 0, 0.9);
  box-shadow: 0 0 0 1px rgba(248, 181, 0, 0.4);
}

.level-chip {
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.6);
}

/* Ana alan */
.app-main {
  padding: 20px 32px 40px;
}

.site-footer {
  text-align: center;
  padding: 16px 12px 28px;
  color: #9ca3af;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.site-footer .copyright {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

/* Üst bar */
.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.summary-card {
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.summary-card .label {
  font-size: 12px;
  opacity: 0.8;
}

.summary-card .value {
  font-size: 18px;
  font-weight: 600;
}

.top-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Butonlar */
.btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  box-shadow: 0 10px 24px rgba(248, 181, 0, 0.5);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(248, 181, 0, 0.7);
}

.btn.ghost {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.7);
}

.btn.ghost:hover {
  background: rgba(148, 163, 184, 0.16);
}

.btn.full-width {
  width: 100%;
}

/* Makine grid */
.machines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

/* Makine kartı */
.machine-card {
  background: rgba(17, 24, 39, 0.95);
  border-radius: 20px;
  padding: 12px 12px 14px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(75, 85, 99, 0.9);
  color: #e5e7eb;
  position: relative;
  overflow: hidden;
  transform-origin: center;
  transform: translateY(4px) scale(0.99);
  opacity: 0;
  animation: cardIn 0.45s ease forwards;
  align-self: start;
  /* yüksek kartlar diğerlerini esnetmesin */
}

.machine-card:nth-child(2) {
  animation-delay: 0.05s;
}

.machine-card:nth-child(3) {
  animation-delay: 0.1s;
}

.machine-card:nth-child(4) {
  animation-delay: 0.15s;
}

.machine-card:nth-child(5) {
  animation-delay: 0.2s;
}

.machine-card:nth-child(6) {
  animation-delay: 0.25s;
}

.machine-card:nth-child(7) {
  animation-delay: 0.3s;
}

.machine-card:nth-child(8) {
  animation-delay: 0.35s;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.machine-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 60%),
    radial-gradient(circle at bottom right, rgba(34, 197, 235, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  /* overlay tıklamaları engellemesin */
}

.machine-card:hover::before {
  opacity: 1;
}

.machine-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.95);
}

/* Header */
.machine-header {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.machine-header img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(248, 250, 252, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.85);
}

.machine-name {
  font-weight: 600;
}

.machine-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.machine-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.machine-total {
  font-size: 13px;
  font-weight: 700;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
  min-width: 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.machine-total.has-items {
  background: #fbbf24;
  color: #111827;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.machine-action-text {
  font-size: 12px;
  color: #60a5fa;
  /* Mavi tonu, tıklanabilir hissi verir */
  font-weight: 500;
  opacity: 0.8;
  display: none;
  /* Mobilde yer kaplamasın */
}

/* Tablet ve üstü için yazıyı göster */
@media (min-width: 600px) {
  .machine-action-text {
    display: block;
  }
}

.machine-toggle-icon {
  /* margin-left: 10px; Parent gap yönetiyor artık */
  color: #9ca3af;
  transition: transform 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
}

/* Kart açıkken ikon dönsün (Modern tarayıcılar için) */
.machine-card:has(.products.open) .machine-toggle-icon {
  transform: rotate(180deg);
  color: #fbbf24;
}

/* Fallback (JS ile active class eklenirse diye) */
.machine-header.active .machine-toggle-icon {
  transform: rotate(180deg);
  color: #fbbf24;
}

/* Ürün listesi – açılır kapanır */
.products {
  display: none;
  /* kapalıyken tamamen görünmesin */
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(55, 65, 81, 0.8);
}

.products.open {
  display: block;
  /* sadece seçilen kart açıldığında */
}

/* Ürün satırı */
.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 6px;
  padding: 4px 4px;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.product-row:hover {
  background: rgba(55, 65, 81, 0.65);
  transform: translateY(-1px);
}

.product-row.search-focus {
  background: rgba(248, 181, 0, 0.16);
  box-shadow: 0 0 0 1px rgba(248, 181, 0, 0.45);
}

.product-info {
  flex: 1;
  font-size: 13px;
}

.product-level {
  font-size: 11px;
  color: #9ca3af;
}

.product-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* STEPPER STYLES */
.stepper-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(31, 41, 55, 0.4);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(248, 181, 0, 0.1);
  color: #fbbf24;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stepper-btn:hover:not(:disabled) {
  background: #fbbf24;
  color: #111827;
  transform: scale(1.1);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
  color: #9ca3af;
}

.stepper-value {
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  min-width: 24px;
  text-align: center;
  transition: color 0.2s ease;
}

.stepper-value.active {
  color: #fbbf24;
  font-weight: 800;
}

/* Gizli input için (gerekirse tamamen gizle ama debug için visible olabilir demiştim, şimdi tamamen gizliyoruz) */
.product-slider {
  display: none;
}

/* Arama sonuç listesi */
.search-results {
  display: none;
  margin-top: 10px;
  max-height: 260px;
  /* Biraz daha uzun */
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  /* Daha belirgin kenarlık */
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.95);
  /* Daha opak arka plan */
  padding: 4px;
  /* İç boşluk */
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

/* Webkit Scrollbar */
.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}

.search-result-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  /* Item köşeleri */
  background: transparent;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  gap: 12px;
  /* Gap arttırıldı */
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  margin-bottom: 2px;
}

.search-result-item:hover {
  background: rgba(55, 65, 81, 0.6);
  transform: translateX(2px);
  /* Hafif hareket efekti */
}

.search-result-item.active {
  background: rgba(248, 181, 0, 0.16);
  box-shadow: inset 0 0 0 1px rgba(248, 181, 0, 0.45);
}

.search-result-item .result-thumb {
  width: 42px;
  /* Biraz büyüttüm */
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.search-result-item .result-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  /* Metin alanı genişlesin */
}

.search-result-item .result-title {
  font-weight: 600;
  font-size: 14px;
  color: #f3f4f6;
}

.search-result-item .result-meta {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.search-result-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Ürün görseli */
.product-controls img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  /* görsel kırpılmadan doğru görünüm */
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.6);
  /* koyu zeminle kontrast */
  flex-shrink: 0;
  /* Mobilde sıkışmasını engelle */
}

/* Uyarı */
.warning {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: fadeIn 0.25s ease;
}

.modal-backdrop.blur {
  backdrop-filter: blur(8px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: radial-gradient(circle at top, #111827 0, #020617 55%);
  color: #e5e7eb;
  border-radius: 16px;
  padding: 18px 18px 20px;
  width: 320px;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.7);
  transform: translateY(8px) scale(0.96);
  animation: modalIn 0.28s ease forwards;
}

@keyframes modalIn {
  to {
    transform: translateY(0) scale(1);
  }
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 6px;
}

.modal p {
  margin-top: 0;
  font-size: 13px;
  color: #cbd5f5;
}

.modal input[type="number"] {
  width: 100%;
  padding: 8px;
  margin: 8px 0 12px 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
}

.modal input[type="password"] {
  width: 100%;
  padding: 8px;
  margin: 8px 0 12px 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
}

.modal input[type="text"] {
  width: 100%;
  margin: 8px 0 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(17, 24, 39, 0.8);
  color: #e5e7eb;
  font-size: 14px;
}

.code-box {
  background: rgba(14, 165, 233, 0.12);
  color: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 6px 0 12px 0;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

/* ===== MOBIL FIX (GELİŞMİŞ) ===== */
@media (max-width: 600px) {

  /* Genel Yazı Boyutunu Büyüt */
  body {
    font-size: 16px;
    /* iOS'te inputlara zoom yapmasını engeller */
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }

  /* Header Düzeni */
  .app-header {
    flex-wrap: wrap;
    padding: 12px;
    gap: 12px;
    justify-content: space-between;
  }

  .logo {
    width: 48px;
    height: 48px;
    font-size: 24px;
    flex-shrink: 0;
  }

  /* Başlık ve Marka */
  .title-block {
    flex: 1;
    min-width: 0;
    /* flex item shrink fix */
  }

  .title-block h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .title-block p {
    display: none;
    /* Mobilde alt başlığı gizle */
  }

  .center-brand {
    display: none;
    /* Mobilde marka ismini gizle */
  }

  /* Dil Seçimi ve Level Chip */
  .language-switch {
    margin-left: 0;
  }

  .level-chip {
    width: 100%;
    margin: 8px 0 0 0 !important;
    text-align: center;
    order: 10;
    padding: 8px;
    background: rgba(15, 23, 42, 0.85);
  }

  /* Ana İçerik */
  .app-main {
    padding: 16px 12px;
  }

  /* Üst Bar (Özet ve Butonlar) */
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .summary-card {
    justify-content: center;
    padding: 14px;
    background: rgba(15, 23, 42, 0.95);
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 sütun */
    gap: 10px;
    /* Boşluğu biraz kısalım */
    margin-left: 0;
    /* Sağa dayalı olmasın */
    width: 100%;
    /* Ekranı kaplasın */
  }

  /* "Siparişi Yazdır" butonu artık diğerleriyle eşit */
  #printBtn {
    grid-column: auto;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    /* Kutuyu doldursun */
  }

  .btn {
    padding: 12px 4px;
    /* Yanlardan az padding */
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    /* Butonlar kutuyu doldursun */
    justify-content: center;
    /* Ortala */
  }

  /* Makine Grid - Mobilde Tek Sütun */
  .machines {
    grid-template-columns: 1fr;
    /* Tam genişlik */
    gap: 24px;
  }

  .machine-card {
    padding: 16px;
    border-radius: 16px;
  }

  .machine-header {
    margin-bottom: 12px;
  }

  .machine-header img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .machine-name {
    font-size: 19px;
  }

  .machine-total {
    font-size: 14px;
    padding: 6px 12px;
    min-width: 32px;
    text-align: center;
  }

  /* Ürün Satırları */
  .product-row {
    padding: 10px 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .product-controls {
    gap: 10px;
  }

  .product-controls img {
    width: 48px;
    height: 48px;
  }

  .product-info {
    font-size: 16px;
    padding-left: 4px;
  }

  .product-level {
    font-size: 13px;
  }

  /* Slider ve Input daha rahat kullanılsın */
  .product-slider {
    width: 80px;
    /* Mobilde sığması için */
    height: 12px;
    /* Kalınlaştır */
  }

  .product-slider::-webkit-slider-thumb {
    width: 28px;
    /* Başparmak için büyüt */
    height: 28px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  .product-qty-input {
    width: 48px;
    height: 36px;
    font-size: 16px;
    border-radius: 8px;
  }

  /* Modallar Tam Genişlik */
  .modal {
    width: 94%;
    max-width: none;
    padding: 24px;
  }

  .modal h2 {
    font-size: 22px;
  }

  .modal input {
    font-size: 18px !important;
    padding: 12px !important;
  }

  .modal-actions .btn {
    padding: 14px;
    font-size: 16px;
    flex: 1;
  }

  /* Arama Sonuçları */
  .search-result-item {
    padding: 16px;
    /* Parmakla kolay seçim */
  }

  .search-result-item .result-title {
    font-size: 16px;
  }

  .search-result-item .result-thumb {
    width: 44px;
    height: 44px;
  }
}

/* Daha küçük ekranlar (iPhone SE vb) */
@media (max-width: 370px) {
  .top-actions {
    grid-template-columns: 1fr;
    /* Butonlar alt alta */
  }

  #printBtn {
    grid-column: span 1;
  }

  .machine-header img {
    width: 48px;
    height: 48px;
  }
}

/* XP Calculator Modal Styles */
.xp-card {
  background: #f8fafc !important;
  /* Light background */
  color: #1e293b !important;
  /* Dark text */
  max-width: 380px !important;
  border: 4px solid #ffffff !important;
  /* White border like image */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
}

.xp-header {
  margin-bottom: 10px;
}

.xp-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 0px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.xp-title {
  font-family: 'Arial Black', sans-serif;
  /* Thick font */
  font-size: 24px;
  color: #15803d !important;
  /* Green title */
  text-transform: uppercase;
  letter-spacing: -0.5px;
  margin: 5px 0 5px 0 !important;
  text-shadow: 1px 1px 0px #dcfce7;
}

.xp-desc {
  font-size: 13px !important;
  color: #64748b !important;
  line-height: 1.4;
}

/* Progress Bar Visual to mimic image */
.xp-progress-visual {
  margin: 15px auto 25px;
  max-width: 200px;
}

.xp-bar-bg {
  height: 16px;
  background: #e2e8f0;
  border-radius: 99px;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.xp-form label {
  display: block;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
  color: #475569 !important;
  margin-left: 2px;
}

.xp-card input[type="number"] {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600;
  transition: all 0.2s;
}

.xp-card input[type="number"]:focus {
  background: #fff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Green Calculate Button */
#xpCalculateBtn.btn.primary {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
  color: #fff !important;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid #166534;
  box-shadow: 0 4px 0 #15803d, 0 8px 15px rgba(21, 128, 61, 0.3) !important;
  margin-top: 10px;
  transform: translateY(0);
}

#xpCalculateBtn.btn.primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #15803d !important;
}

/* Result Card */
.xp-result-container {
  margin-top: 25px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.xp-result-label {
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
  color: #15803d !important;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.xp-result-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.xp-value {
  font-size: 42px;
  font-weight: 800;
  color: #15803d;
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -1px;
}

.xp-unit {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.xp-sub {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 8px;
}

/* XP Calculator Modal Styles */
.xp-card {
  background: #f8fafc !important;
  /* Light background */
  color: #1e293b !important;
  /* Dark text */
  max-width: 380px !important;
  border: 4px solid #ffffff !important;
  /* White border like image */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
}

.xp-header {
  margin-bottom: 10px;
}

.xp-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 0px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.xp-title {
  font-family: 'Arial Black', sans-serif;
  /* Thick font */
  font-size: 24px;
  color: #15803d !important;
  /* Green title */
  text-transform: uppercase;
  letter-spacing: -0.5px;
  margin: 5px 0 5px 0 !important;
  text-shadow: 1px 1px 0px #dcfce7;
}

.xp-desc {
  font-size: 13px !important;
  color: #64748b !important;
  line-height: 1.4;
}

/* Progress Bar Visual to mimic image */
.xp-progress-visual {
  margin: 15px auto 25px;
  max-width: 200px;
}

.xp-bar-bg {
  height: 16px;
  background: #e2e8f0;
  border-radius: 99px;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.xp-form label {
  display: block;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
  color: #475569 !important;
  margin-left: 2px;
}

.xp-card input[type="number"] {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600;
  transition: all 0.2s;
}

.xp-card input[type="number"]:focus {
  background: #fff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Green Calculate Button */
#xpCalculateBtn.btn.primary {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
  color: #fff !important;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid #166534;
  box-shadow: 0 4px 0 #15803d, 0 8px 15px rgba(21, 128, 61, 0.3) !important;
  margin-top: 10px;
  transform: translateY(0);
}

#xpCalculateBtn.btn.primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #15803d !important;
}

/* Result Card */
.xp-result-container {
  margin-top: 25px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.xp-result-label {
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
  color: #15803d !important;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.xp-result-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.xp-value {
  font-size: 42px;
  font-weight: 800;
  color: #15803d;
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -1px;
}

.xp-unit {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.xp-sub {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 8px;
}