/* Yönetim ortak stiller */
/* Header üstte sabit, gövde normal akışta */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  }
body { display: block; padding: 0; }
body.yk-modal-open { overflow: hidden; }
.container { max-width: 100%; margin: 0 auto; padding: 16px; }
.yk-header { width: 100%; position: sticky; top: 0; z-index: 50; }

.control-btn.small-btn { padding: 6px 10px; font-size: 12px; }
.control-btn.success-btn { background: #16a34a !important; color: #fff !important; }
.control-btn.success-btn:hover { background: #15803d !important ; }

.yk-modal { position: fixed; inset: 0; display: none; z-index: 1000; }
.yk-modal[aria-hidden="false"] { display: block; }
.yk-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.yk-modal-dialog { position: relative; width: 920px; max-width: calc(100% - 32px); margin: 5vh auto; background: #ffffff; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 40px rgba(2,6,23,.35), 0 2px 8px rgba(2,6,23,.12); border: 1px solid #e5e7eb; animation: ykModalIn .18s ease-out; max-height: calc(100vh - 10vh); display: flex; flex-direction: column; }
.yk-modal-header { padding: 14px 18px; border-bottom: 1px solid #eef2f7; display:flex; align-items:center; justify-content: space-between; background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); flex: 0 0 auto; }
.yk-modal-header h3 { font-size: 16px; font-weight: 800; color: #0f172a; letter-spacing: .2px; }
.yk-modal-body { padding: 18px; display: grid; gap: 12px; flex: 1 1 auto; overflow: auto; }
.yk-modal-footer { padding: 12px 16px; border-top: 1px solid #eee; display:flex; justify-content:flex-end; gap:10px; flex: 0 0 auto; background: #fff; }
.yk-modal-close { background: transparent; border: 0; font-size: 24px; cursor: pointer; }

.yk-form-group { display: grid; gap: 6px; }
.yk-form-group label { font-weight: 700; font-size: 12px; color: #334155; letter-spacing: .2px; }
.yk-form-group input, .yk-form-group select { padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 14px; background: #f8fafc; color: #0f172a; transition: border-color .15s, box-shadow .15s, background .15s; }
.yk-form-group input:hover, .yk-form-group select:hover { background: #f1f5f9; }
.yk-form-group input:focus, .yk-form-group select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.15); background: #ffffff; }
.yk-select { appearance:none; background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7L10 12L15 7' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position: right 12px center; padding-right:34px; }
/* Kategori satırı: select geniş, buton küçük ve sabit */
.yk-flex.yk-gap .yk-select { flex: 1; min-width: 0; }
.yk-modal #new-category-toggle { padding: 6px 10px; font-size: 12px; white-space: nowrap; min-width: auto; }

.yk-flex {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.yk-gap {
    gap: 10px;
}
/* Modal dışında: sadece sade bir inline grup (kart değil).
   Modal içinde ve düzenleyicide araç çubuğu görünümü .toolbar-row ile sağlanır. */
.yk-flex.yk-gap {
    margin: 0;
}

/* Düzenleyicideki ikincil araç çubukları (JSON / Rehber / Döngü vb.).
   .control-buttons ile aynı dil: yumuşak arkaplan, esnek satır. */
.toolbar-row {
    gap: 8px !important;
    padding: 10px 12px;
    margin-top: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.toolbar-row .control-btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    gap: 6px;
}
.toolbar-row .control-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(2,6,23,.06);
    transform: none;
}
.yk-grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: center; }
.yk-grid-3 { display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; align-items: center; }
.yk-form-group fieldset { border:1px solid #e5e7eb; border-radius: 12px; padding: 10px 12px; }
.yk-form-group fieldset legend { font-size: 11px; font-weight: 800; color: #475569; padding: 0 6px; }

.yk-grid-info { padding: 10px 12px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight:700; color:#334155; }
.yk-preview-wrap { border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px; min-height: 240px; display:flex; align-items:center; justify-content:center; background: repeating-conic-gradient(#f8fafc 0% 25%, #ffffff 0% 50%) 50%/20px 20px; }
.yk-preview-wrap img { max-width: 280px; max-height: 180px; width: auto; height: auto; }
.yk-feedback { color: #2563eb; }

.yk-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.35;
}
.yk-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #6366f1;
  cursor: pointer;
  flex-shrink: 0;
}
.yk-help {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
  margin-top: 4px;
}

.yk-label-block {
  display: block;
  font-weight: 700;
  font-size: 12px;
  color: #334155;
  margin-bottom: 8px;
}
.yk-radio-stack {
  display: grid;
  gap: 8px;
}
.yk-radio-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
.yk-radio-row input[type="radio"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: #6366f1;
  flex-shrink: 0;
}

/* ekle / duzenle: grup sil + düzenle sütunu */
#instructions-panel .instruction-group {
  position: relative;
  padding-right: 48px;
  min-height: 56px;
}
#instructions-panel .instruction-group-editor-tools {
  position: absolute;
  top: 8px;
  right: 6px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
#instructions-panel .instruction-group-delete-btn--editor,
#instructions-panel .instruction-group-edit-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.95);
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
#instructions-panel .instruction-group-delete-btn--editor:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.5);
}
#instructions-panel .instruction-group-edit-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.45);
  transform: scale(1.05);
}
#instructions-panel .instruction-steps-empty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 8px 10px;
}
#instructions-panel .instruction-steps-empty-hint {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}
#instructions-panel .instruction-remove-start-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: #fff1f2;
  color: #b91c1c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#instructions-panel .instruction-remove-start-btn:hover {
  background: #ffe4e6;
  border-color: rgba(220, 38, 38, 0.55);
}

/* Code textarea for JSON auto draw modal */
.yk-code-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  background: #0a0f1a;
  color: #e2e8f0;
  border: 1px solid #1f2a44;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
}
.yk-code-textarea::placeholder { color: #64748b; opacity: .8; }
.yk-code-textarea:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.15); }

/* Basit header */
.yk-header { background: #0f172a; color: #fff; padding: 10px 16px; display:flex; align-items:center; justify-content: space-between; }
.yk-header a { color: #cbd5e1; text-decoration: none; }
.yk-header a:hover { color: #fff; }

/* Header nav buttons */
.yk-header-nav { display:flex; align-items:center; gap:10px; }
.yk-nav-btn { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); color:#e2e8f0; border-radius: 10px; font-weight: 800; font-size: 13px; transition: background .15s, border-color .15s, transform .05s; }
.yk-nav-btn i { opacity: .85; }
.yk-nav-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); transform: translateY(-1px); color:#fff; }
.yk-nav-btn:active { transform: translateY(0); }

/* Ekle modal iki kolon düzeni */
.yk-modal-two-col { display:grid; grid-template-columns: minmax(300px, 360px) 1fr; gap: 16px; align-items: start; }
.yk-modal-two-col .yk-col { display: grid; gap: 10px; align-content: start; }
.yk-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; background:#f1f5f9; color:#334155; font-size:12px; font-weight:700; }

/* Modern butonlar (modal içinde override) */
.yk-modal .control-btn { appearance: none; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px; font-weight: 700; font-size: 14px; cursor: pointer; transition: box-shadow .15s, transform .05s, background .15s; }
.yk-modal .control-btn:hover {  box-shadow: 0 1px 0 rgba(2,6,23,.05), 0 4px 10px rgba(2,6,23,.06); }
.yk-modal .control-btn:active { transform: translateY(1px); }
.yk-modal .primary-btn { color: #ffffff; border-color: transparent; background: linear-gradient(180deg,#6366f1 0%,#4f46e5 100%); box-shadow: 0 8px 16px rgba(99,102,241,.25); }
.yk-modal .primary-btn:hover { background: linear-gradient(180deg,#5457ee 0%,#4338ca 100%); box-shadow: 0 10px 18px rgba(67,56,202,.28); }
.yk-modal .small-btn { padding: 8px 12px; font-size: 12px; }
.yk-modal #new-category-toggle { padding: 6px 10px; font-size: 12px; }

/* Shared neutral buttons for filters/toolbars */
.filter-btn { height:40px; width:44px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #e5e7eb; background:#f8fafc; color:#334155; border-radius:10px; }
.filter-btn:hover { background:#eef2f7; }
.clear-btn { height:40px; display:inline-flex; align-items:center; gap:6px; padding:0 12px; border:1px solid #e5e7eb; background:#fff; color:#334155; border-radius:10px; }
.clear-btn:hover { background:#f8fafc; }

/* Segment control (combine/split) */
.yk-segment { display:inline-flex; border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; background:#f8fafc; box-shadow: inset 0 -1px 0 rgba(2,6,23,.02); }
.yk-segment .seg-btn { padding:10px 14px; border:0; background:transparent; color:#475569; font-weight:800; font-size:13px; cursor:pointer; transition: background .15s, color .15s, box-shadow .15s; }
.yk-segment .seg-btn:hover { background:#eef2f7; }
.yk-segment .seg-btn.active { background:#ffffff; color:#4338ca; box-shadow: inset 0 0 0 2px #e5e7eb, 0 2px 8px rgba(2,6,23,.06); }
.yk-segment .seg-btn:focus-visible { outline:none; box-shadow: inset 0 0 0 2px #a5b4fc; }

@keyframes ykModalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Coach Modal Modern Stilleri */
#coach-modal .yk-modal-dialog {
  width: 1000px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
}

#coach-modal .yk-modal-body {
  padding: 24px;
  gap: 20px;
}

#coach-modal .yk-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Coach Form Grupları */
#coach-modal .yk-form-group {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#coach-modal .yk-form-group label {
  font-weight: 700;
  font-size: 13px;
  color: #374151;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  display: block;
}

/* Coach Input Stilleri */
#coach-modal .yk-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  background: #ffffff;
  color: #374151;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Nunito', sans-serif;
  font-weight: 500;
}

#coach-modal .yk-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background: #ffffff;
}

#coach-modal .yk-input:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

#coach-modal .yk-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* Coach Select Stilleri */
#coach-modal .yk-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
}

/* Coach Checkbox Stilleri */
#coach-modal .yk-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 8px;
}

#coach-modal .yk-checkbox:checked {
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

#coach-modal .yk-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

#coach-modal .yk-checkbox:hover {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.05);
}

/* Coach Fieldset Stilleri */
#coach-modal fieldset {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  margin-top: 16px;
}

#coach-modal fieldset legend {
  font-size: 12px;
  font-weight: 800;
  color: #6366f1;
  padding: 0 12px;
  background: #ffffff;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

/* Coach Grid Stilleri */
#coach-modal .yk-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

#coach-modal .yk-grid-2 label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}

/* Coach Buton Stilleri */
#coach-modal .control-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}

#coach-modal .control-btn.small-btn {
  padding: 8px 12px;
  font-size: 12px;
  min-height: 36px;
}

#coach-modal .control-btn.primary-btn {
  background: #6366f1;
  color: #ffffff;
}

#coach-modal .control-btn.primary-btn:hover {
  background: #5457ee;
  transform: translateY(-1px);
}

#coach-modal .control-btn.danger-btn {
  background: #ef4444;
  color: #ffffff;
}

#coach-modal .control-btn.danger-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

#coach-modal .control-btn.success-btn {
  background: #10b981;
  color: #ffffff;
}

#coach-modal .control-btn.success-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Coach Liste Stilleri */
#coach-modal .yk-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

#coach-modal .yk-list li {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

#coach-modal .yk-list li:hover {
  border-color: #6366f1;
  background: #f8fafc;
}

#coach-modal .yk-list code {
  flex: 1;
  background: #1f2937;
  color: #f3f4f6;
  padding: 12px;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Coach Detail Code Container */
#coach-modal .detail-code {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
}

/* Coach Buton Grupları */
#coach-modal .yk-flex.yk-gap {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  margin: 16px 0;
  gap: 12px;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
  #coach-modal .yk-modal-dialog {
    width: calc(100vw - 20px);
    margin: 10px;
  }
  
  #coach-modal .yk-modal-two-col {
    grid-template-columns: 1fr;
  }
  
  #coach-modal .yk-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Save Modal Modern Stilleri */
#save-modal .yk-modal-dialog {
  width: 1000px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
}

#save-modal .yk-modal-body {
  padding: 24px;
  gap: 20px;
}

#save-modal .yk-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Save Form Grupları */
#save-modal .yk-form-group {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#save-modal .yk-form-group label {
  font-weight: 700;
  font-size: 13px;
  color: #374151;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  display: block;
}

/* Save Input Stilleri */
#save-modal input[type="text"],
#save-modal input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  background: #ffffff;
  color: #374151;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Nunito', sans-serif;
  font-weight: 500;
}

#save-modal input[type="text"]:focus,
#save-modal input[type="number"]:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background: #ffffff;
}

#save-modal input[type="text"]:hover,
#save-modal input[type="number"]:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

#save-modal input[type="text"]::placeholder,
#save-modal input[type="number"]::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* Save Select Stilleri */
#save-modal .yk-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  background: #ffffff;
  color: #374151;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Nunito', sans-serif;
  font-weight: 500;
}

#save-modal .yk-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background: #ffffff;
}

#save-modal .yk-select:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

/* Save Buton Stilleri */
#save-modal .control-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}

#save-modal .control-btn.small-btn {
  padding: 8px 12px;
  font-size: 12px;
  min-height: 36px;
}

#save-modal .control-btn.primary-btn {
  background: #6366f1;
  color: #ffffff;
}

#save-modal .control-btn.primary-btn:hover {
  background: #5457ee;
  transform: translateY(-1px);
}

#save-modal .control-btn.success-btn {
  background: #10b981;
  color: #ffffff;
}

#save-modal .control-btn.success-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Save Preview Wrap */
#save-modal .yk-preview-wrap {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: repeating-conic-gradient(#f8fafc 0% 25%, #ffffff 0% 50%) 50%/20px 20px;
}

#save-modal .yk-preview-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Save Badge */
#save-modal .yk-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #6366f1;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Save Segment Control */
#save-modal .yk-segment {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

#save-modal .yk-segment .seg-btn {
  padding: 12px 20px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

#save-modal .yk-segment .seg-btn:hover {
  background: #f8fafc;
  color: #374151;
}

#save-modal .yk-segment .seg-btn.active {
  background: #6366f1;
  color: #ffffff;
}

#save-modal .yk-segment .seg-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Save Feedback — pill, ikon ve yumuşak girişli */
#save-modal .yk-feedback {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #4f46e5;
  padding: 7px 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  max-width: 100%;
  animation: ykFeedbackIn .22s ease-out;
}
#save-modal .yk-feedback::before {
  content: "\f06a"; /* fa-circle-exclamation */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 13px;
  color: #6366f1;
  flex: 0 0 auto;
}
#save-modal .yk-feedback:empty {
  display: none;
}

/* Gönderiliyor durumu — disabled görünüm + spinner */
#save-modal #save-level-btn.is-busy,
#save-modal #save-level-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
  filter: saturate(0.85);
}
#save-modal #save-level-btn .fa-spin {
  animation: fa-spin 0.9s linear infinite;
}
@keyframes ykFeedbackIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Ziyaretçi modalı — bilgilendirme kutusu */
#save-modal .yk-info-box {
  font-size: 12px;
  line-height: 1.55;
  color: #475569;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 220px;
  overflow: auto;
}

/* Modal footer — sol meta + sağ butonlar */
#save-modal .yk-modal-footer {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
#save-modal .yk-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  flex: 1 1 260px;
  min-width: 0;
}

/* Onay pill — kompakt, etkileşimli, checkbox ile birleşik */
#save-modal .yk-consent-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  user-select: none;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
#save-modal .yk-consent-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
#save-modal .yk-consent-pill input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #6366f1;
  flex: 0 0 auto;
}
#save-modal .yk-consent-pill:has(input:checked) {
  background: rgba(99, 102, 241, 0.10);
  border-color: #6366f1;
  color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
#save-modal .yk-consent-pill i {
  color: #6366f1;
}

/* Save Buton Grupları */
#save-modal .yk-flex.yk-gap {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  margin: 0;
  gap: 12px;
}

/* Save Modal Responsive */
@media (max-width: 768px) {
  #save-modal .yk-modal-dialog {
    width: calc(100vw - 20px);
    margin: 10px;
  }
  
  #save-modal .yk-modal-two-col {
    grid-template-columns: 1fr;
  }
  
  #save-modal .yk-flex.yk-gap {
    flex-direction: column;
  }
}

/* Shared detail modal visuals */
.detail-modal .yk-modal-dialog { width: 720px; }
.detail-grid { display:grid; grid-template-columns: 220px 1fr; gap: 14px; }
.detail-img { border:1px solid #eee; border-radius:8px; background:#fff; display:flex; align-items:center; justify-content:center; padding:8px; }
.detail-img img { max-width:100%; height:auto; }
.detail-title { font-weight:800; font-size:18px; margin-bottom:6px; }
.detail-code { background:#f8fafc; border:1px dashed #e5e7eb; border-radius:8px; padding:8px; max-height:280px; overflow:auto; }




.yk-modal-close {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    position: absolute;
    right: 0;
    top: 0;
    background-color: color(srgb 0.8895 0.2176 0.2022);
    color: #fff;
    z-index: 9999999999;
    border-radius: 0 0 0 12px;
    }
.yk-modal-close:hover {
    background-color: #e04848;
    color: #fff;
}

/* Izgara + Fabric vektör dekorasyon katmanı (ekle / duzenle) */
.grid-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.grid-mode-toggle .control-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4338ca;
  box-shadow: 0 1px 4px rgba(67, 56, 202, 0.35);
}
.grid-mode-toggle .control-btn.active:hover {
  background: #4338ca;
  color: #fff;
}
.grid-mode-label {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}
.grid-mode-status-text {
  margin: 0 0 12px 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  max-width: 100%;
}
.grid-mode-status-text strong {
  color: #3730a3;
}

/* Izgara boyutu: hover ile görünen kenar kontrolleri (ekle / duzenle) */
.grid-editor-block {
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
}
.grid-dim-surface {
  position: relative;
  display: inline-block;
  padding-top: 26px;
  padding-left: 36px;
}
.grid-dim-zone {
  position: absolute;
  z-index: 12;
  box-sizing: border-box;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.grid-dim-zone--top:hover,
.grid-dim-zone--top:focus-within {
  background: rgba(99, 102, 241, 0.06);
}
.grid-dim-zone--left:hover,
.grid-dim-zone--left:focus-within {
  background: rgba(99, 102, 241, 0.06);
}
/* Üst şerit: sütun kontrolleri — ızgaranın hemen üstü */
.grid-dim-zone--top {
  top: -20px;
  left: 36px;
  right: 0;
  height: 26px;
}
/* Sol şerit: satır kontrolleri (yükseklik = ızgara ile aynı) */
.grid-dim-zone--left {
  left: -20px;
  top: 26px;
  width: 52px;
  bottom: 0;
}
.grid-dim-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.grid-dim-zone--left .grid-dim-reveal {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 0;
  padding: 8px 4px;
  transform: translateX(-6px);
}
.grid-dim-zone--top:hover .grid-dim-reveal,
.grid-dim-zone--top:focus-within .grid-dim-reveal,
.grid-dim-zone--left:hover .grid-dim-reveal,
.grid-dim-zone--left:focus-within .grid-dim-reveal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.grid-dim-zone--left:hover .grid-dim-reveal,
.grid-dim-zone--left:focus-within .grid-dim-reveal {
  transform: translateX(0);
}
.grid-dim-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
}
.grid-dim-chip--vertical {
  flex-direction: column;
  padding: 8px 4px;
  gap: 6px;
}
.grid-dim-chip-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  min-width: 2em;
  text-align: center;
}
.grid-dim-chip--vertical .grid-dim-chip-label {
  min-width: 0;
}
.grid-dim-btn {
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.grid-dim-btn:hover {
  border-color: #818cf8;
  color: #4338ca;
  background: #eef2ff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.grid-dim-btn:active {
  transform: scale(0.96);
}
@media (prefers-reduced-motion: reduce) {
  .grid-dim-reveal {
    transition: opacity 0.15s ease, visibility 0.15s ease;
    transform: none !important;
  }
}
/* Dokunmatik: şerit hafif görünür */
@media (hover: none) {
  .grid-dim-zone--top,
  .grid-dim-zone--left {
    background: rgba(248, 250, 252, 0.65);
    border-radius: 8px;
  }
  .grid-dim-reveal {
    opacity: 0;
    visibility: hidden;
  }
  .grid-dim-zone--top:active .grid-dim-reveal,
  .grid-dim-zone--left:active .grid-dim-reveal,
  .grid-dim-zone--top:focus-within .grid-dim-reveal,
  .grid-dim-zone--left:focus-within .grid-dim-reveal {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
}

.grid-stack {
  position: relative;
  display: inline-block;
  vertical-align: top;
}
.grid-stack.mode-decorate #grid-container {
  pointer-events: none;
}
.grid-stack.mode-draw #grid-container {
  pointer-events: auto;
}
.fabric-decor-wrap {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  pointer-events: none;
}
.grid-stack.mode-decorate .fabric-decor-wrap {
  pointer-events: auto;
}
.vector-palette-panel {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.vector-palette-title {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
  line-height: 1.35;
}
.vector-asset-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}
.vector-palette-item-wrap {
  position: relative;
  flex-shrink: 0;
}
.vector-palette-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.vector-palette-delete:hover {
  background: #dc2626;
}
.vector-palette-item {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: grab;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vector-palette-item:active {
  cursor: grabbing;
}
.vector-palette-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.vector-palette-name {
  font-size: 10px;
  padding: 4px;
  text-align: center;
  color: #64748b;
  line-height: 1.2;
}
.vector-palette-err {
  font-size: 12px;
  color: #b91c1c;
}

/* ============================================================
   Vektör Çizim sayfası (cizim_alani.php)
   ============================================================ */
.vector-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.vector-studio {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.vector-toolbar-card,
.vector-canvas-shell,
.vector-save-card,
.vector-library-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(2, 6, 23, 0.04);
}

.vector-toolbar-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vector-tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.vector-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #f8fafc;
  border-radius: 10px;
}
.vt-spacer { flex: 1; }

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.tool-btn i { font-size: 13px; }
.tool-btn:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(2, 6, 23, 0.08);
}
.tool-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(99, 102, 241, .28);
}
.tool-btn.danger-ghost { color: #b91c1c; }
.tool-btn.danger-ghost:hover { background: #fef2f2; color: #dc2626; }

.color-field,
.range-field,
.num-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.color-field { padding: 2px 8px 2px 2px; }
.color-field input[type="color"] {
  width: 28px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }

.range-field input[type="range"] {
  width: 96px;
  accent-color: #8b5cf6;
}
.range-field .range-value {
  min-width: 32px;
  text-align: right;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.num-field input[type="number"] {
  width: 48px;
  height: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 6px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  font-family: inherit;
}

.vector-style-hint {
  width: 100%;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 10px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vector-style-hint i { color: #8b5cf6; }

.vector-canvas-shell {
  overflow: auto;
  max-width: 100%;
}
.vector-canvas-shell .canvas-container { margin: 0 auto; }

.vector-save-card {
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.vector-save-card input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
}
.vector-save-card input[type="text"]:focus {
  outline: none;
  background: #ffffff;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.vector-save-card .save-feedback {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}
.vector-save-card .edit-hint {
  width: 100%;
  font-size: 12px;
  color: #f59e0b;
  font-weight: 700;
  min-height: 1em;
  margin: 0;
}

.vector-library-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
}
.vector-library-card h2 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vector-library-card h2 i { color: #8b5cf6; }
.vector-library-card .library-sub { font-size: 12px; color: #64748b; margin: 0; }

.vector-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
  min-height: 120px;
}
.vector-library-item {
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .12s ease, box-shadow .15s ease;
}
.vector-library-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,.12);
  background: #ffffff;
}
.vector-library-thumb {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vector-library-thumb img { max-width: 86%; max-height: 86%; object-fit: contain; }
.vector-library-thumb-ph { color: #cbd5e1; font-size: 24px; }
.vector-library-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vector-library-actions {
  display: flex;
  gap: 4px;
}
.vector-library-actions .tool-btn {
  flex: 1;
  min-width: 0;
  height: 26px;
  padding: 0 6px;
  font-size: 11px;
  background: #ffffff;
}
.vector-library-actions .tool-btn:hover { color: #4338ca; }
.vector-library-actions .tool-btn.danger-ghost:hover { background: #fef2f2; }

.vector-library-empty,
.vector-library-loading {
  grid-column: 1 / -1;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  padding: 24px 8px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .vector-page { grid-template-columns: 1fr; }
  .vector-library-card { position: static; max-height: none; }
  .vector-library-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    max-height: 520px;
  }
}
@media (max-width: 640px) {
  .range-field input[type="range"] { width: 72px; }
}

/* ============================================================
   Kategori Yönetimi (kategoriler.php)
   ============================================================ */
.kat-difficulty-select {
  min-width: 120px;
  padding: 10px 36px 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  background-color: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  font-family: inherit;
}
.kat-difficulty-select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}
.kat-difficulty-select:hover { border-color: #fcd34d; }

/* Yeni kategori paneli */
.add-category-section {
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.add-category-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px 0;
  color: #92400e;
  font-size: 14px;
  font-weight: 800;
}
.add-category-section-title i { color: #f59e0b; }
.add-category-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.add-category-form input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
}
.add-category-form input[type="text"]:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}

/* Kategori kartı — düz, tek border, iç içe kutu yok */
.category-item {
 

  padding: 12px 14px;
  margin-bottom: 0px;
  
}
.category-item:hover {
  
}
.category-item.dragging { opacity: .55; }

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.category-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #cbd5e1;
  cursor: grab;
  flex-shrink: 0;
}
.drag-handle:hover { color: #94a3b8; }

.order-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.category-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease;
}
.category-thumb:hover { transform: scale(1.04); }
.category-thumb img { width: 100%; height: 100%; object-fit: cover; }
.category-thumb i { color: #fbbf24; font-size: 18px; }

.category-details { min-width: 0; flex: 1; }
.category-details h3 {
  margin: 0 0 3px 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  color: #64748b;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-weight: 700;
}
.cat-chip i { font-size: 10px; color: #f59e0b; }
.cat-chip code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  color: #475569;
  font-family: 'Nunito', ui-monospace, monospace;
  font-size: 11px;
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.difficulty-easy { background: #d1fae5; color: #065f46; }
.difficulty-medium { background: #fef3c7; color: #92400e; }
.difficulty-hard { background: #fee2e2; color: #991b1b; }

.cat-icon-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.cat-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease;
}
.cat-icon-btn i { font-size: 12px; transition: transform .2s ease; }
.cat-icon-btn:hover { background: #f1f5f9; color: #0f172a; }
.cat-icon-btn.active { background: #fff7ed; color: #b45309; }
.cat-icon-btn.active i { transform: rotate(180deg); }
.cat-icon-btn--danger:hover { background: #fef2f2; color: #dc2626; }

/* Inline edit — hafif, border yok, sadece arka plan ayrımı */
.inline-edit {
  display: none;
  margin-top: 10px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 10px;
  flex-direction: column;
  gap: 8px;
}
.inline-edit.show { display: flex; }
.inline-edit .edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.inline-edit input[type="text"].edit-input {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
}
.inline-edit input[type="text"].edit-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,.18);
}
.inline-edit .upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}
.inline-edit input[type="file"] {
  font-size: 12px;
  font-family: inherit;
  color: #475569;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

/* Bölümler paneli — border yok, hafif arka plan */
.levels-section {
  display: none;
  margin-top: -15px;
  padding: 20px;
  padding-top: 40px;
  background: #f8fafc;
  border-radius: 0 0 10px 10px;
  margin-bottom: 30px;

}
.levels-section.show { display: block; }
.levels-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.levels-section-head h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.levels-section-head h4 i { color: #f59e0b; }

.kat-levels-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kat-level-item {
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: grab;
  transition: box-shadow .15s ease;
}
.kat-level-item:hover { box-shadow: 0 2px 8px rgba(2, 6, 23, .06); }
.kat-level-item:active { cursor: grabbing; }
.kat-level-item.dragging { opacity: .55; }

.kat-level-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.kat-level-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.kat-level-thumb img { width: 100%; height: 100%; }
.kat-level-thumb i { color: #cbd5e1; font-size: 14px; }
.kat-level-text { min-width: 0; flex: 1; }
.kat-level-text h5 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.level-order-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #fff7ed;
  color: #b45309;
  font-weight: 800;
  font-size: 10px;
  margin-right: 4px;
}
.kat-level-text .auto-tag { color: #94a3b8; font-size: 10px; font-weight: 700; }

.empty-soft {
  text-align: center;
  padding: 24px 12px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}
.empty-soft i {
  display: block;
  font-size: 28px;
  color: #cbd5e1;
  margin-bottom: 8px;
}
.empty-soft h3 {
  margin: 0 0 6px 0;
  color: #6b7280;
  font-size: 16px;
  font-weight: 800;
}
.empty-soft p {
  margin: 0;
  color: #9ca3af;
  font-size: 13px;
}

/* ============================================================
   Çizgi stili seçici (ekle.php / duzenle.php)
   ============================================================ */
.line-style-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 10px;
}
.line-style-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.line-style-field > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.line-style-field > span i { color: #6366f1; }
.line-style-field input[type="color"] {
  width: 32px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.line-style-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.line-style-field input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }
.line-style-field input[type="range"] {
  width: 110px;
  accent-color: #6366f1;
}
.line-thickness-value {
  min-width: 22px;
  text-align: right;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.line-style-controls .control-btn.small-btn {
  padding: 6px 10px;
  font-size: 12px;
}

/* ============================================================
   Sayfalama (bolumler.php)
   ============================================================ */
.pagination-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 24px 0 8px;
}
.pagination-container:empty { display: none; }
.pagination-container .page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.pagination-container .page-btn:hover:not(:disabled):not(.is-active) {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.pagination-container .page-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.pagination-container .page-btn.is-active {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #ffffff;
  cursor: default;
}
.pagination-container .page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pagination-container .page-nav {
  color: #6b7280;
}
.pagination-container .page-ellipsis {
  color: #9ca3af;
  padding: 0 4px;
  user-select: none;
}
.pagination-container .page-info {
  margin-left: 10px;
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .pagination-container .page-info { display: none; }
  .pagination-container .page-btn { min-width: 32px; height: 32px; font-size: 12px; }
}

