/* ===== kartvizit-tasarimlari.php ===== */

/* ── Breadcrumb ── */
.kt-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  padding: 20px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.kt-breadcrumb a { color: var(--muted); text-decoration: none }
.kt-breadcrumb a:hover { color: var(--ink) }
.kt-breadcrumb svg { width: 13px; height: 13px; flex-shrink: 0 }
.kt-breadcrumb span { color: var(--ink) }

/* ── Two-column layout ── */
.kt-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 36px;
  align-items: start;
  padding-bottom: 80px;
}

/* ── Sidebar ── */
.kt-sidebar { position: sticky; top: 24px }
.kt-sidebar-inner { padding: 6px 0 }

.kt-filter-group { border-bottom: 1px solid var(--line-2); padding-bottom: 4px; margin-bottom: 4px }

.kt-fg-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px; background: none; border: none;
  font-size: 13px; font-weight: 800; color: var(--ink); cursor: pointer;
}
.kt-fg-toggle svg { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; flex-shrink: 0 }
.kt-fg-toggle.is-open svg { transform: rotate(180deg) }

.kt-fg-body { max-height: 0; overflow: hidden; transition: max-height .25s ease }

.kt-check {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 4px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: color .15s;
}
.kt-check:hover { color: var(--ink) }
.kt-check-box {
  flex-shrink: 0; width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--line); background: #fff;
  transition: all .15s; position: relative;
}
.kt-check input { display: none }
.kt-check input:checked + .kt-check-box {
  background: var(--blue); border-color: var(--blue);
}
.kt-check input:checked + .kt-check-box::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}
.kt-check-count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  color: var(--muted); background: var(--surface);
  padding: 1px 6px; border-radius: 10px;
}

.kt-clear-btn {
  width: 100%; margin-top: 12px; padding: 9px;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: none; font-size: 12.5px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: color .15s, border-color .15s;
}
.kt-clear-btn:hover { color: #dc2626; border-color: #dc2626 }

/* ── Main head ── */
.kt-page-title { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; margin: 0 0 3px }
.kt-page-sub   { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 }
.kt-page-sub span { color: var(--ink); font-weight: 700 }

.kt-main-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 22px 0 18px; border-bottom: 1px solid var(--line-2);
}
.kt-main-controls { display: flex; gap: 10px; align-items: center }

.kt-filter-toggle-btn {
  display: none; align-items: center; gap: 7px;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: #fff; padding: 8px 14px;
  font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.kt-filter-toggle-btn svg { width: 14px; height: 14px }

.kt-sort-sel {
  appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 13px;
  border: 1.5px solid var(--line); border-radius: 9px;
  padding: 8px 30px 8px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.kt-sort-sel:focus { outline: none; border-color: var(--blue) }

/* ── Active chips ── */
.kt-active-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 0 }
.kt-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--blue-50); border: 1px solid var(--blue);
  border-radius: 20px; padding: 4px 10px 4px 12px;
  font-size: 12px; font-weight: 700; color: var(--blue);
}
.kt-chip button {
  background: none; border: none; cursor: pointer;
  font-size: 15px; color: var(--blue); line-height: 1;
  padding: 0; display: flex; align-items: center;
}

/* ── Grid ── */
.kt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 20px;
}

/* ── Card ── */
.kt-card { cursor: pointer }
.kt-preview-wrap {
  position: relative; border-radius: 12px;
  overflow: hidden; border: 1.5px solid var(--line);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.kt-card:hover .kt-preview-wrap {
  border-color: var(--blue);
  box-shadow: 0 12px 32px -8px rgba(10,132,217,.2);
  transform: translateY(-3px);
}

/* ── Business card preview ── */
.ktp {
  width: 100%;
  aspect-ratio: 85 / 55;
  background: var(--ktp-bg);
  color: var(--ktp-ink);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
}

/* Layout 1: Minimal */
.ktp-layout-1 { padding: 14px 16px; display: flex; flex-direction: column }
.ktp-layout-1 .ktp-name   { font-size: 11.5px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 5px }
.ktp-layout-1 .ktp-rule   { width: 24px; height: 1.5px; background: var(--ktp-accent); margin-bottom: 5px }
.ktp-layout-1 .ktp-job    { font-size: 6.5px; font-weight: 600; color: var(--ktp-muted); flex: 1 }
.ktp-layout-1 .ktp-contacts { font-size: 6px; display: grid; gap: 2px; color: var(--ktp-muted) }
.ktp-layout-1 .ktp-logo-ph { position: absolute; bottom: 13px; right: 16px; width: 20px; height: 20px; border-radius: 4px; background: var(--ktp-accent); opacity: .2 }
.ktp-layout-1 .ktp-accent-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--ktp-accent) }

/* Layout 2: Split */
.ktp-layout-2 { padding: 0; display: flex }
.ktp-layout-2 .ktp-left {
  width: 36%; background: var(--ktp-accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  flex-shrink: 0;
}
.ktp-layout-2 .ktp-monogram { font-size: 22px; font-weight: 900; color: rgba(255,255,255,.9); letter-spacing: -.04em; line-height: 1 }
.ktp-layout-2 .ktp-left-line { width: 24px; height: 1.5px; background: rgba(255,255,255,.35) }
.ktp-layout-2 .ktp-right { flex: 1; padding: 14px 13px; display: flex; flex-direction: column; justify-content: center; background: var(--ktp-bg) }
.ktp-layout-2 .ktp-name    { font-size: 10.5px; font-weight: 800; margin-bottom: 4px; color: var(--ktp-ink) }
.ktp-layout-2 .ktp-rule    { width: 18px; height: 1.5px; background: var(--ktp-accent); margin-bottom: 4px }
.ktp-layout-2 .ktp-job     { font-size: 6.5px; font-weight: 600; color: var(--ktp-muted); margin-bottom: 1px }
.ktp-layout-2 .ktp-company { font-size: 6px; font-weight: 700; color: var(--ktp-muted); margin-bottom: 8px }
.ktp-layout-2 .ktp-contacts { font-size: 6px; display: grid; gap: 2px; color: var(--ktp-muted) }

/* Layout 3: Full Color */
.ktp-layout-3 { padding: 14px 16px; display: flex; flex-direction: column }
.ktp-layout-3 .ktp-deco  { position: absolute; top: -28px; right: -28px; width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.08) }
.ktp-layout-3 .ktp-deco2 { position: absolute; bottom: -18px; left: -18px; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.05) }
.ktp-layout-3 .ktp-name   { font-size: 11.5px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 5px; position: relative }
.ktp-layout-3 .ktp-rule   { width: 24px; height: 1.5px; background: var(--ktp-accent); margin-bottom: 5px; position: relative }
.ktp-layout-3 .ktp-job    { font-size: 6px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; opacity: .65; flex: 1; position: relative }
.ktp-layout-3 .ktp-contacts { position: absolute; bottom: 12px; left: 16px; right: 16px; font-size: 6px; display: flex; gap: 12px; opacity: .7 }

/* Layout 4: Bold Initial */
.ktp-layout-4 { padding: 0; display: flex }
.ktp-layout-4 .ktp-initial-col { width: 42px; flex-shrink: 0; background: var(--ktp-accent); display: flex; align-items: center; justify-content: center }
.ktp-layout-4 .ktp-initial     { font-size: 30px; font-weight: 900; color: rgba(255,255,255,.92); letter-spacing: -.04em; line-height: 1 }
.ktp-layout-4 .ktp-right       { flex: 1; padding: 13px 14px; display: flex; flex-direction: column; justify-content: center; background: var(--ktp-bg) }
.ktp-layout-4 .ktp-name    { font-size: 10.5px; font-weight: 800; margin-bottom: 4px; color: var(--ktp-ink) }
.ktp-layout-4 .ktp-rule    { width: 18px; height: 1.5px; background: var(--ktp-accent); margin-bottom: 4px }
.ktp-layout-4 .ktp-job     { font-size: 6.5px; font-weight: 600; color: var(--ktp-muted); margin-bottom: 1px }
.ktp-layout-4 .ktp-company { font-size: 6px; font-weight: 700; color: var(--ktp-accent); margin-bottom: 8px }
.ktp-layout-4 .ktp-contacts { font-size: 6px; display: grid; gap: 2px; color: var(--ktp-muted) }

/* Layout 5: Geometric */
.ktp-layout-5 { padding: 14px 16px; display: flex; flex-direction: column }
.ktp-layout-5 .ktp-circle  { position: absolute; top: -30px; right: -30px; width: 92px; height: 92px; border-radius: 50%; background: var(--ktp-accent); opacity: .14 }
.ktp-layout-5 .ktp-circle2 { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ktp-accent); opacity: .22 }
.ktp-layout-5 .ktp-name   { font-size: 11.5px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 5px; position: relative }
.ktp-layout-5 .ktp-rule   { width: 24px; height: 1.5px; background: var(--ktp-accent); margin-bottom: 5px; position: relative }
.ktp-layout-5 .ktp-job    { font-size: 6.5px; font-weight: 600; color: var(--ktp-muted); flex: 1; position: relative }
.ktp-layout-5 .ktp-contacts { position: absolute; bottom: 12px; left: 16px; right: 16px; font-size: 6px; display: flex; gap: 12px; color: var(--ktp-muted) }
.ktp-layout-5 .ktp-bottom-deco { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(to right, var(--ktp-accent), transparent) }

/* ── Badges ── */
.kt-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 20px; pointer-events: none;
}
.kt-badge-new { background: #dcfce7; color: #166534 }
.kt-badge-pop { background: #fef3c7; color: #92400e }

/* ── Hover overlay ── */
.kt-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  opacity: 0; transition: opacity .18s;
}
.kt-preview-wrap:hover .kt-overlay { opacity: 1 }

.kt-overlay-btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--blue); color: #fff; text-decoration: none;
  border-radius: 10px; padding: 9px 18px;
  font-size: 12.5px; font-weight: 800; white-space: nowrap;
  transition: background .15s;
}
.kt-overlay-btn-primary:hover { background: #0a6fb5 }
.kt-overlay-btn-primary svg { width: 13px; height: 13px }

.kt-overlay-btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15); color: #fff; border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 10px; padding: 8px 16px;
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.kt-overlay-btn-secondary:hover { background: rgba(255,255,255,.25) }
.kt-overlay-btn-secondary svg { width: 13px; height: 13px }

/* ── Card info ── */
.kt-card-info { padding: 10px 2px 4px }
.kt-card-name { font-size: 12.5px; font-weight: 700; color: var(--ink) }

/* ── Empty state ── */
.kt-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 0; text-align: center;
}
.kt-empty svg { width: 48px; height: 48px; color: var(--muted) }
.kt-empty p { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 }
.kt-empty button {
  background: none; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 9px 20px; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
}

/* ── Preview Modal ── */
.kt-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.6);
  z-index: 900; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.kt-modal-backdrop.is-open { opacity: 1; pointer-events: auto }

.kt-modal {
  position: fixed; top: 50%; left: 50%; z-index: 901;
  width: min(520px, 90vw);
  transform: translate(-50%,-50%) scale(.96);
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 64px -16px rgba(0,0,0,.35);
  padding: 28px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.kt-modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1) }

.kt-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all .15s;
}
.kt-modal-close:hover { border-color: #dc2626; color: #dc2626 }
.kt-modal-close svg { width: 14px; height: 14px }

.kt-modal-preview { border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); margin-bottom: 20px }
.kt-modal-preview .ktp { font-size: 1.9px } /* scale up all relative units */

.kt-modal-foot { display: flex; align-items: center; justify-content: space-between }
.kt-modal-tpl-name { font-size: 15px; font-weight: 800; color: var(--ink) }
.kt-modal-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--blue); color: #fff; text-decoration: none;
  border-radius: 11px; padding: 11px 22px;
  font-size: 14px; font-weight: 800; transition: background .15s;
}
.kt-modal-cta:hover { background: #0a6fb5 }
.kt-modal-cta svg { width: 15px; height: 15px }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .kt-grid { grid-template-columns: repeat(3,1fr) }
}
@media (max-width: 900px) {
  .kt-layout { grid-template-columns: 1fr }
  .kt-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 800;
    background: #fff; border-right: 1px solid var(--line);
    overflow-y: auto; padding: 24px 20px;
    transform: translateX(-100%); transition: transform .25s;
    box-shadow: 4px 0 24px rgba(0,0,0,.08);
  }
  .kt-sidebar.is-open { transform: none }
  .kt-filter-toggle-btn { display: inline-flex }
  .kt-grid { grid-template-columns: repeat(2,1fr) }
}
@media (max-width: 500px) {
  .kt-grid { grid-template-columns: 1fr }
}
