:root { 
    --primary: #4f46e5; 
    --dark: #1e293b; 
    --gray: #f8fafc; 
    --border: #e2e8f0; 
}

.kk-main-container { 
    max-width: 1400px; width: 98%; margin: 20px auto; 
    font-family: 'Inter', system-ui, sans-serif; 
    color: var(--dark); box-sizing: border-box; 
}
.kk-main-container * { box-sizing: border-box; }

/* --- HEADER (STEPPER) --- */
.kk-wizard-header { 
    display: flex; justify-content: center; align-items: center; 
    background: #fff; padding: 25px; border-radius: 12px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); margin-bottom: 30px; 
}
.wizard-step { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #94a3b8; font-size: 14px; }
.wizard-step.active { color: var(--primary); }
.step-circle { 
    width: 32px; height: 32px; background: #f1f5f9; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 13px; font-weight: bold; 
}
.wizard-step.active .step-circle { background: var(--primary); color: white; }
.step-line { width: 60px; height: 2px; background: #e2e8f0; margin: 0 20px; }

/* --- LAYOUT --- */
.kk-workspace-row { display: flex; gap: 30px; min-height: 650px; flex-wrap: wrap; }
.kk-left-col { flex: 1; min-width: 500px; background: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }

.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.group-title { font-size: 13px; color: #64748b; font-weight: 700; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 5px; letter-spacing: 0.5px; text-transform: uppercase; }
.panel-title { margin-top: 0; font-size: 20px; margin-bottom: 20px; color: #111; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.nav-back { font-size: 12px; color: #64748b; cursor: pointer; margin-bottom: 15px; display: inline-block; }

/* --- GRID SİSTEMİ --- */
.grid-layout-social, .grid-layout-general { display: block; width: 100%; overflow: hidden; }

.g-card { 
    float: left; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 12px; 
    padding: 15px 5px; text-align: center; cursor: pointer; transition: 0.2s; background: #fff; 
    height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; 
}
.g-card:hover { border-color: var(--primary); background: #f5f3ff; transform: translateY(-3px); }
.gc-img { width: 45px; height: 45px; margin-bottom: 8px; object-fit: contain; }
.g-card strong { display: block; font-size: 13px; color: #333; font-weight: 600; }

.grid-layout-social .g-card { width: 18%; margin-right: 2.5%; } 
.grid-layout-social .g-card:nth-child(5n) { margin-right: 0; }

.grid-layout-general .g-card { width: 23.5%; margin-right: 2%; height: 120px; }
.grid-layout-general .g-card:nth-child(4n) { margin-right: 0; }

/* --- FORMLAR --- */
.kk-inp { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 15px; background: #f8fafc; font-size: 14px; }
.btn-continue { width: 100%; background: var(--primary); color: white; border: none; padding: 14px; border-radius: 8px; font-weight: 700; cursor: pointer; margin-top: 10px; }
.file-upload-styled { border: 2px dashed var(--border); padding: 15px; text-align: center; border-radius: 8px; position: relative; cursor: pointer; }
.file-upload-styled input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.color-palette { display: flex; gap: 10px; }
.cp-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid #eee; }
.cp-input { width: 40px; height: 35px; border: none; background: none; cursor: pointer; }

/* --- SAĞ PANEL --- */
.kk-right-col { flex: 0 0 450px; display: flex; flex-direction: column; }
.view-toggle-bar { display: flex; gap: 5px; background: #fff; padding: 8px; border-radius: 12px; margin-bottom: 20px; justify-content: center; flex-wrap: wrap; }
.vt-btn { border: 1px solid transparent; background: transparent; padding: 6px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #64748b; cursor: pointer; }
.vt-btn.active { background: var(--gray); color: var(--dark); border-color: var(--border); }
.canvas-wrapper { background: #cbd5e1; border-radius: 16px; flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 550px; }
.view-layer { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; }
.view-layer.active { display: flex; }

/* --- TELEFON & ORTALAMA (FLEX FIX) --- */
.phone-frame { 
    width: 260px; height: 520px; background: #fff; 
    border: 10px solid #1e293b; border-radius: 35px; 
    position: relative; display: flex; flex-direction: column; overflow: hidden; 
}
.notch { width: 100px; height: 20px; background: #1e293b; border-radius: 0 0 10px 10px; margin: 0 auto; z-index: 2; }

.screen { 
    padding: 30px 20px; text-align: center; width: 100%; box-sizing: border-box; 
    display: flex; flex-direction: column; align-items: center; 
    justify-content: flex-start; /* İçeriği yukarıdan başlat */
}

.app-header { margin-bottom: 10px; margin-top: 10px; width: 100%; display: flex; flex-direction: column; align-items: center; }
#ph-icon-container { width: 100%; display: flex; justify-content: center; }
.default-icon { width: 60px; height: 60px; object-fit: contain; }
.custom-logo { max-width: 120px; max-height: 60px; object-fit: contain; display: block; margin: 0 auto; }
#ph-title { font-size: 16px; margin: 5px 0 0 0; text-align: center; }
#ph-note { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 15px; }

/* QR Kapsayıcı: Telefon için */
.qr-container-phone {
    display: flex !important;
    flex-direction: column; align-items: center; justify-content: center;
    width: 200px !important;
    min-width: 200px !important;
    height: auto !important;
    background: #f8fafc; padding: 10px; border-radius: 12px; 
    margin: 20px auto !important;
    flex-shrink: 0 !important;
}

/* QR Kapsayıcı: Baskı için (Daha esnek) */
.qr-container-print {
    display: flex !important;
    flex-direction: column; align-items: center; justify-content: center;
    width: auto !important;
    max-width: 90% !important;
    min-width: 150px !important; 
    background: #f8fafc; padding: 10px; border-radius: 12px; 
    margin: 15px auto !important;
}

#qr-target-phone { width: 180px !important; height: 180px !important; display: block !important; margin: 0 auto !important; }
#qr-target-print { width: 180px !important; height: 180px !important; display: block !important; margin: 0 auto !important; }
#qr-target-phone svg, #qr-target-print svg { width: 100%; height: 100%; display: block; }

/* --- BASKI KAĞIDI --- */
#print-paper { 
    background: #fff; box-shadow: 0 15px 40px rgba(0,0,0,0.2); 
    position: relative; padding: 25px; text-align: center; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    overflow: hidden;
}
.paper-a4 { width: 300px; height: 420px; }
.paper-a5 { width: 250px; height: 350px; border-radius: 0 0 15px 15px; border-top: 4px solid rgba(0,0,0,0.1); }
.paper-a6 { width: 200px; height: 280px; border-radius: 0 0 10px 10px; border-top: 3px solid rgba(0,0,0,0.1); }
.paper-sticker { width: 300px; height: 300px; border-radius: 50%; padding: 0 !important; }

.paper-inner { width: 100%; z-index: 2; display: flex; flex-direction: column; align-items: center; }

/* Küçük Kağıtlar İçin Ölçekleme */
.paper-a6 .paper-inner { transform: scale(0.65); transform-origin: center center; width: 130%; }
.paper-sticker .paper-inner { transform: scale(0.70); transform-origin: center center; padding-top: 40px; width: 120%; }

.print-header { margin-bottom: 5px; height: 50px; width: 100%; display: flex; align-items: center; justify-content: center; }
.p-footer { font-weight: 800; color: #000; font-size: 16px; margin-top: 5px; text-transform: uppercase; }

/* Demo & Filigran */
.watermark { position: absolute; opacity: 0.08; font-size: 35px; transform: rotate(-45deg); font-weight: 900; pointer-events: none; }
.demo-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background:rgba(255,255,255,0.2); display:flex; align-items:center; justify-content:center; color:rgba(0,0,0,0.1); font-weight:900; font-size:20px; transform:rotate(-45deg); pointer-events: none; }
.demo-badge { position: absolute; bottom:-10px; left:50%; transform:translateX(-50%); background:#000; color:#fff; font-size:8px; padding:2px 6px; border-radius:4px; pointer-events: none; }

/* Checkout */
.checkout-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 25px; }
.detail-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.detail-total { border-top: 1px solid #ddd; margin-top: 15px; padding-top: 15px; display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; color: var(--primary); }
.btn-pay { width: 100%; background: #10b981; color: white; padding: 16px; border: none; border-radius: 8px; font-weight: 800; cursor: pointer; }

@media (max-width: 900px) {
    .kk-workspace-row { flex-direction: column; }
    .kk-left-col { min-width: auto; }
    .g-card { width: 48% !important; margin-right: 2% !important; }
}

/* Önizleme rozeti şablonun DIŞINDA (paper içine girmez) */
.canvas-wrapper{ position:relative; }
.kk-preview-badge{
  position:absolute;
  top:12px;
  left:12px;
  transform:none;
  bottom:auto;
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  background:#ffffff;
  color:#0f172a;
  border:1px solid #e2e8f0;
  box-shadow:0 6px 18px rgba(15,23,42,.08);
  z-index:20;
}
