
.ftcrm-wrap{max-width:1400px}.ftcrm-cards{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:16px;margin:18px 0}.ftcrm-card-link{text-decoration:none;color:inherit}.ftcrm-card,.ftcrm-panel{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;box-shadow:0 4px 20px rgba(15,23,42,.04)}.ftcrm-card{transition:.18s ease}.ftcrm-card-link:hover .ftcrm-card{transform:translateY(-2px);box-shadow:0 8px 28px rgba(15,23,42,.08)}.ftcrm-card-label{font-size:13px;color:#64748b;margin-bottom:8px}.ftcrm-card-value{font-size:28px;font-weight:700}.ftcrm-card-sub{margin-top:8px;font-size:12px;color:#64748b}.ftcrm-form .ftcrm-grid,.ftcrm-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:16px}.ftcrm-grid-2{display:grid;grid-template-columns:1.4fr .8fr;gap:16px;margin-bottom:16px}.ftcrm-field{display:flex;flex-direction:column;gap:6px;position:relative}.ftcrm-field-full{grid-column:1 / -1}.ftcrm-field input,.ftcrm-field select,.ftcrm-field textarea{width:100%;max-width:none;border:1px solid #cbd5e1;border-radius:8px;padding:10px 12px}.ftcrm-field textarea{min-height:100px}.ftcrm-product-search-wrap{position:relative;margin-bottom:14px}#ftcrm-product-search{min-width:360px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px}#ftcrm-product-results{position:absolute;left:0;top:42px;z-index:999;width:520px;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 10px 24px rgba(0,0,0,.08);display:none;max-height:280px;overflow:auto}.ftcrm-search-item{padding:10px 12px;border-bottom:1px solid #eef2f7;cursor:pointer}.ftcrm-search-item:hover{background:#f8fafc}.ftcrm-search-title{font-weight:600}.ftcrm-search-sub{font-size:12px;color:#64748b}.ftcrm-items-table input{width:100%}.ftcrm-items-table th{white-space:nowrap}.ftcrm-totals{text-align:right;margin-top:14px;font-size:18px}.ftcrm-alert{background:#fff7ed;color:#9a3412;border:1px solid #fdba74;border-radius:10px;padding:10px 12px;margin-bottom:14px}.ftcrm-mobile-wrap{max-width:900px;margin:0 auto;padding:14px}.ftcrm-mobile-note{background:#ecfdf5;border:1px solid #86efac;color:#166534;padding:10px 12px;border-radius:10px;margin-bottom:12px}.ftcrm-suggest{display:none;position:absolute;top:72px;left:0;right:0;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 10px 24px rgba(0,0,0,.08);max-height:260px;overflow:auto;z-index:999}.ftcrm-suggest-item{padding:10px 12px;cursor:pointer;border-bottom:1px solid #eef2f7}.ftcrm-suggest-item:hover{background:#f8fafc}.ftcrm-suggest-title{font-weight:600}.ftcrm-suggest-sub{font-size:12px;color:#64748b}@media (max-width:1100px){.ftcrm-grid-2,.ftcrm-cards,.ftcrm-form .ftcrm-grid,.ftcrm-grid{grid-template-columns:1fr}#ftcrm-product-search,#ftcrm-product-results{width:100%;min-width:0}}

/* ---- v1.28: hizli teklif olusturma arayuzu ---- */
.ftcrm-summary{margin-left:auto;border-collapse:collapse;min-width:280px}
.ftcrm-summary td{padding:6px 12px;font-size:14px}
.ftcrm-summary td:last-child{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.ftcrm-summary .ftcrm-sum-grand td{border-top:2px solid #1d2327;font-weight:700;font-size:17px;padding-top:10px}
.ftcrm-totals{display:flex;justify-content:flex-end;margin:12px 0 4px}

.ftcrm-product-search-wrap{position:relative}
#ftcrm-product-search{min-width:340px;padding:8px 12px;font-size:14px}
#ftcrm-product-results{position:absolute;z-index:50;background:#fff;border:1px solid #c3c4c7;border-radius:6px;box-shadow:0 8px 24px rgba(0,0,0,.14);max-height:380px;overflow:auto;min-width:440px;display:none;margin-top:4px}
.ftcrm-search-item{padding:9px 12px;cursor:pointer;border-bottom:1px solid #f0f0f1}
.ftcrm-search-item:last-child{border-bottom:0}
.ftcrm-search-item:hover,.ftcrm-search-item.is-active{background:#f0f6fc;box-shadow:inset 3px 0 0 #2271b1}
.ftcrm-search-title{font-weight:600;line-height:1.35}
.ftcrm-search-sub{color:#646970;font-size:12px;margin-top:2px;font-variant-numeric:tabular-nums}
.ftcrm-search-empty{padding:10px 12px;color:#646970}

.ftcrm-items-table .ftcrm-qty{width:80px}
.ftcrm-items-table .ftcrm-title{width:100%}
.ftcrm-items-table input[type=number]{text-align:right;font-variant-numeric:tabular-nums}
.ftcrm-items-table .ftcrm-line-total{background:#f6f7f7}
.ftcrm-row-actions{white-space:nowrap}
.ftcrm-row-actions .button{padding:0 8px;min-height:28px;line-height:26px}
.ftcrm-remove-row{color:#b32d2e}

.ftcrm-kbd-hint{color:#646970;font-size:12px;margin:6px 0 0}
.ftcrm-kbd-hint kbd{background:#f0f0f1;border:1px solid #c3c4c7;border-bottom-width:2px;border-radius:3px;padding:1px 5px;font-size:11px}

@media (max-width:782px){
  #ftcrm-product-search,#ftcrm-product-results{min-width:0;width:100%}
  .ftcrm-summary{width:100%;min-width:0}
}

/* ---- v1.29: siparise cevirme ---- */
.ftcrm-convert-done{background:#edfaef;border-left:4px solid #00a32a;padding:10px 12px;margin:0 0 10px}
.ftcrm-convert-done span{text-transform:capitalize}
.ftcrm-muted{color:#a7aaad}

/* ---- v1.30: urun gorselleri, onizleme, siralama ---- */

/* Arama sonuclari: gorsel + bilgi + onizleme butonu */
.ftcrm-search-item{display:flex;align-items:center;gap:10px}
.ftcrm-search-info{flex:1;min-width:0}
.ftcrm-search-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ftcrm-search-thumb{width:44px;height:44px;flex:0 0 44px;object-fit:contain;background:#fff;border:1px solid #dcdcde;border-radius:4px}
.ftcrm-search-thumb-empty{background:repeating-linear-gradient(45deg,#f6f7f7,#f6f7f7 6px,#eceff1 6px,#eceff1 12px)}
.ftcrm-search-item .ftcrm-preview-product{flex:0 0 auto}

/* Satir icindeki gorsel */
.ftcrm-title-cell{display:flex;align-items:center;gap:8px}
.ftcrm-title-cell .ftcrm-title{flex:1;min-width:120px}
.ftcrm-row-thumb{width:36px;height:36px;flex:0 0 36px;object-fit:contain;background:#fff;border:1px solid #dcdcde;border-radius:4px}
.ftcrm-row-thumb-empty{background:repeating-linear-gradient(45deg,#f6f7f7,#f6f7f7 5px,#eceff1 5px,#eceff1 10px)}

/* Surukleme tutamagi */
.ftcrm-drag-handle{display:inline-block;cursor:grab;color:#8c8f94;padding:0 6px;font-size:16px;line-height:28px;user-select:none;letter-spacing:-3px}
.ftcrm-drag-handle:active{cursor:grabbing;color:#2271b1}
.ftcrm-item-row.ui-sortable-helper,.ftcrm-drag-helper{display:table;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.18);opacity:.97}
.ui-sortable-placeholder{visibility:visible!important;background:#f0f6fc!important;height:52px}

/* Onizleme penceresi */
.ftcrm-modal{position:fixed;inset:0;z-index:160000;display:flex;align-items:center;justify-content:center}
.ftcrm-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.6)}
.ftcrm-modal-box{position:relative;background:#fff;border-radius:8px;padding:20px;max-width:440px;width:calc(100% - 32px);max-height:88vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.35);text-align:center}
.ftcrm-modal-close{position:absolute;top:8px;right:8px;background:none;border:0;font-size:18px;line-height:1;cursor:pointer;color:#646970;padding:6px}
.ftcrm-modal-close:hover{color:#d63638}
.ftcrm-modal-imgwrap{margin:4px 0 14px}
.ftcrm-modal-img{max-width:100%;max-height:320px;object-fit:contain}
.ftcrm-modal-title{font-size:15px;font-weight:600;line-height:1.4}
.ftcrm-modal-meta{color:#646970;font-size:13px;margin-top:6px;font-variant-numeric:tabular-nums}
.ftcrm-modal-actions{margin:16px 0 0}

/* ---- v1.31: daha buyuk onizleme, fiyat one cikarildi ---- */
.ftcrm-modal-box{max-width:560px;padding:24px}
.ftcrm-modal-img{max-height:420px}
.ftcrm-modal-title{font-size:16px}
.ftcrm-modal-meta{font-size:18px;font-weight:700;color:#1d2327;margin-top:10px}

/* ---- v1.33: musteri onayi/odemesi ac-kapa anahtari ----
   .ftcrm-field input{width:100%} kurali checkbox'i da yakalayip enine
   yayiyordu; anahtari kendi kutusuna hapsedip o kurali etkisiz birakiyoruz. */
.ftcrm-switch-row{display:flex;gap:12px;align-items:flex-start;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px;cursor:pointer;transition:border-color .18s,background .18s}
.ftcrm-switch-row:hover{background:#f1f5f9;border-color:#cbd5e1}
.ftcrm-switch{position:relative;display:inline-block;flex:0 0 46px;width:46px;height:26px;margin-top:1px}
.ftcrm-switch input[type=checkbox]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer;z-index:2;min-height:0}
.ftcrm-slider{position:absolute;inset:0;background:#cbd5e1;border-radius:26px;transition:background .18s}
.ftcrm-slider:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(15,23,42,.3);transition:transform .18s}
.ftcrm-switch input[type=checkbox]:checked~.ftcrm-slider{background:#1aa84a}
.ftcrm-switch input[type=checkbox]:checked~.ftcrm-slider:before{transform:translateX(20px)}
.ftcrm-switch input[type=checkbox]:focus-visible~.ftcrm-slider{box-shadow:0 0 0 2px #fff,0 0 0 4px #2271b1}
.ftcrm-switch-text{display:flex;flex-direction:column;gap:3px;line-height:1.45}
.ftcrm-switch-text strong{font-weight:600;color:#1d2327}
.ftcrm-switch-text small{color:#64748b;font-size:12px}

/* ---- v1.40: iskonto, mesajdan teklif ---- */
.ftcrm-disc-cell{white-space:nowrap}
.ftcrm-disc-cell .ftcrm-disc-value{width:calc(100% - 74px)!important;display:inline-block}
.ftcrm-disc-cell .ftcrm-disc-type{width:68px;min-width:0;vertical-align:top}
.ftcrm-item-row.has-discount .ftcrm-line-total{background:#fef3f2;color:#b42318}
.ftcrm-item-row.ftcrm-needs-price td{background:#fffaeb!important}
.ftcrm-ai{border:1px solid #c7d7fe;background:linear-gradient(180deg,#f5f8ff,#fff);margin:12px 0 16px}
.ftcrm-ai-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.ftcrm-ai-head h2{margin:0}
.ftcrm-ai-badge{font-size:12px;background:#eef4ff;color:#3538cd;border:1px solid #c7d7fe;border-radius:99px;padding:3px 10px}
#ftcrm-ai-text{width:100%;margin-top:10px;border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;font-size:14px}
.ftcrm-ai-status{color:#344054;font-weight:500;margin-left:6px}
.ftcrm-ai-alt{margin:6px 0;font-size:12.5px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ftcrm-ai-alt span{color:#667085}
.ftcrm-ai-warn{background:#fffaeb;border:1px solid #fedf89;color:#93370d;border-radius:8px;padding:8px 10px;margin:6px 0}

/* ---- v1.41 ---- */
.ftcrm-paym{display:flex;flex-wrap:wrap;gap:8px}
.ftcrm-paym-opt{position:relative;display:block;cursor:pointer;margin:0}
.ftcrm-paym-opt input{position:absolute;opacity:0;pointer-events:none}
.ftcrm-paym-card{display:flex;align-items:center;gap:8px;height:100%;padding:6px 32px 6px 7px;border:1.5px solid #dcdfe4;border-radius:9px;background:#fff;transition:border-color .15s,box-shadow .15s,background .15s}
.ftcrm-paym-opt:hover .ftcrm-paym-card{border-color:#f4c46e;box-shadow:0 2px 10px rgba(244,165,28,.12)}
.ftcrm-paym-ico{display:flex;gap:2px;align-items:center;justify-content:center;flex:0 0 auto;min-width:28px;height:28px;padding:0 5px;border-radius:7px;background:#f3f4f6;color:#6b7280;transition:background .15s,color .15s}
.ftcrm-paym-ico svg{width:15px;height:15px}
.ftcrm-paym-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.ftcrm-paym-txt strong{font-size:12.5px;white-space:nowrap;color:#1f2937;line-height:1.3}
.ftcrm-paym-txt small{display:none}
.ftcrm-paym-check{position:absolute;top:50%;right:9px;width:15px;height:15px;margin-top:-7.5px;border-radius:50%;border:1.5px solid #cfd4dc;background:#fff;transition:all .15s}
.ftcrm-paym-opt input:checked + .ftcrm-paym-card{border-color:#f4a51c;background:#fffaf1;box-shadow:0 0 0 2px rgba(244,165,28,.15)}
.ftcrm-paym-opt input:checked + .ftcrm-paym-card .ftcrm-paym-ico{background:#f4a51c;color:#fff}
.ftcrm-paym-opt input:checked + .ftcrm-paym-card .ftcrm-paym-check{border-color:#f4a51c;background:#f4a51c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/9px no-repeat}
.ftcrm-paym-opt input:focus-visible + .ftcrm-paym-card{outline:2px solid #2271b1;outline-offset:2px}
.ftcrm-disc-tools{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 4px}
.ftcrm-disc-box{border:1px dashed #cbd5e1;border-radius:10px;padding:10px 12px;background:#fafbfc}
.ftcrm-disc-box h4{margin:0 0 2px;font-size:13px}
.ftcrm-disc-box p{margin:0 0 8px;color:#667085;font-size:12px}
.ftcrm-inline{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.ftcrm-inline input[type=number]{width:110px;border:1px solid #cbd5e1;border-radius:6px;padding:5px 8px}
.ftcrm-inline label{display:flex;align-items:center;gap:6px;font-weight:600}
.ftcrm-ai-pick{display:block;font-size:11.5px;color:#667085;margin-top:2px}
@media (max-width:1100px){.ftcrm-disc-tools{grid-template-columns:1fr}}
.ftcrm-title-cell{flex-wrap:wrap}.ftcrm-title-cell .ftcrm-ai-pick{flex-basis:100%;padding-left:44px}

/* ---- v1.47: durum rozeti + telefon duzeni (listeler ve urun satirlari kart olur) ---- */
.ftcrm-badge{display:inline-block;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:600;line-height:1.6;white-space:nowrap;background:#f1f5f9;color:#475569}
.ftcrm-badge-ok{background:#ecfdf3;color:#067647}
.ftcrm-badge-wait{background:#fffaeb;color:#b54708}
.ftcrm-badge-off{background:#fef3f2;color:#b42318}
.ftcrm-badge-sent{background:#eff8ff;color:#175cd3}
@media screen and (max-width:782px){
  .ftcrm-wrap{max-width:100%;overflow-x:hidden}
  .ftcrm-panel{padding:12px;border-radius:12px}
  .ftcrm-wrap .page-title-action{margin-left:6px}

  /* Listeler: her satir bir kart */
  .ftcrm-list,.ftcrm-list tbody,.ftcrm-list tr,.ftcrm-list td{display:block;width:100%;box-sizing:border-box}
  .ftcrm-list{border:0;background:transparent;box-shadow:none}
  .ftcrm-list thead{display:none}
  .ftcrm-list tr{background:#fff!important;border:1px solid #e2e8f0;border-radius:12px;margin:0 0 10px;padding:8px 12px}
  .ftcrm-list td{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:5px 0!important;border:0;text-align:right;word-break:break-word}
  .ftcrm-list td:before{flex:0 0 auto;color:#64748b;font-size:12px;font-weight:500;text-align:left}
  .ftcrm-list td:last-child{justify-content:flex-start;flex-wrap:wrap;gap:6px;padding-top:9px!important;margin-top:4px;border-top:1px solid #f1f5f9}
  .ftcrm-list td:last-child:before{display:none}
  .ftcrm-list td:last-child .button{min-height:34px;line-height:32px;padding:0 14px}

  .ftcrm-list-quotes td:nth-child(1){font-weight:700;font-size:15px}
  .ftcrm-list-quotes td:nth-child(1):before{content:"Teklif No"}
  .ftcrm-list-quotes td:nth-child(2):before{content:"Müşteri"}
  .ftcrm-list-quotes td:nth-child(3):before{content:"Tarih"}
  .ftcrm-list-quotes td:nth-child(4){display:none}
  .ftcrm-list-quotes td:nth-child(5){font-weight:700}
  .ftcrm-list-quotes td:nth-child(5):before{content:"Tutar"}
  .ftcrm-list-quotes td:nth-child(6):before{content:"Durum"}
  .ftcrm-list-quotes td:nth-child(7):before{content:"Sipariş";margin-right:auto}
  .ftcrm-list-quotes td:nth-child(7) br{display:none}

  .ftcrm-list-customers td:nth-child(1){font-size:15px}
  .ftcrm-list-customers td:nth-child(1):before{content:"Ad Soyad"}
  .ftcrm-list-customers td:nth-child(2):before{content:"Firma"}
  .ftcrm-list-customers td:nth-child(3):before{content:"Telefon"}
  .ftcrm-list-customers td:nth-child(4):before{content:"E-Posta"}
  .ftcrm-list-customers td:nth-child(5):before{content:"Teklif"}

  .ftcrm-list-cquotes td:nth-child(1):before{content:"Teklif No"}
  .ftcrm-list-cquotes td:nth-child(2):before{content:"Tarih"}
  .ftcrm-list-cquotes td:nth-child(3):before{content:"Para Birimi"}
  .ftcrm-list-cquotes td:nth-child(4):before{content:"Tutar"}
  .ftcrm-list-cquotes td:nth-child(5):before{content:"Durum"}

  /* Urun satirlari: kart; ust satir urun, altta adet/fiyat/iskonto/toplam */
  .ftcrm-items-table,.ftcrm-items-table tbody{display:block;width:100%;border:0;background:transparent;box-shadow:none}
  .ftcrm-items-table thead{display:none}
  .ftcrm-items-table tr.ftcrm-item-row{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;background:#fff!important;border:1px solid #e2e8f0;border-radius:12px;padding:10px;margin:0 0 10px}
  .ftcrm-items-table td{display:block;padding:0!important;border:0;width:auto!important;min-width:0}
  .ftcrm-items-table td:before{display:block;color:#64748b;font-size:11.5px;font-weight:500;margin:0 0 3px}
  .ftcrm-items-table td:nth-child(2){grid-column:1 / -1;grid-row:1}
  .ftcrm-items-table td:nth-child(1):before{content:"Adet"}
  .ftcrm-items-table td:nth-child(3):before{content:"Birim Fiyat"}
  .ftcrm-items-table td:nth-child(4):before{content:"İskonto"}
  .ftcrm-items-table td:nth-child(5):before{content:"Satır Toplamı"}
  .ftcrm-items-table td:nth-child(6){grid-column:1 / -1;display:flex;justify-content:flex-end;gap:6px}
  .ftcrm-items-table input,.ftcrm-items-table select{width:100%;min-height:38px;font-size:16px}
  .ftcrm-items-table .ftcrm-qty{width:100%}
  .ftcrm-title-cell{flex-wrap:wrap}
  .ftcrm-title-cell .ftcrm-title{flex:1 1 calc(100% - 50px);min-width:0}
  .ftcrm-disc-cell .ftcrm-disc-value{width:calc(100% - 74px)!important}
  .ftcrm-row-actions .button{min-height:34px;line-height:32px}
  #ftcrm-product-search{min-width:0;width:100%;font-size:16px}
  .ftcrm-product-search-wrap .button{margin-top:6px}
  .ftcrm-kbd-hint{display:none}
  .ftcrm-inline input[type=number]{width:100%;flex:1}
  .ftcrm-field input,.ftcrm-field select,.ftcrm-field textarea{font-size:16px}
}
.ftcrm-share-row{display:flex;gap:8px}
.ftcrm-share-row input{flex:1;min-width:0;background:#f8fafc;font-size:13px}
.ftcrm-share-row .button{white-space:nowrap}
.ftcrm-share-link{margin-bottom:12px}
