/* ═══════════════════════════════════════════════════════
   FREELANCE HAVUZU — full styling
   Tüm selector'lar `.fl-*` ile başlar (namespacing).
═══════════════════════════════════════════════════════ */

/* ── Shell layout ─────────────────────────────────── */
.fl-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--bg);
  color: var(--text);
}

/* ── Header (title + stats + actions) ─────────────── */
.fl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
  gap: 24px;
}
.fl-header-left  { display: flex; align-items: center; gap: 24px; flex: 1; min-width: 0; }
.fl-header-right { display: flex; align-items: center; gap: 8px; }

.fl-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* Stats bar (Toplam / Aktif / Pasif / Ort. saat) */
.fl-stats {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.fl-stat {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 12px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 70px;
  align-items: center;
}
.fl-stat-num { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.1; }
.fl-stat-lbl { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 2px; }
.fl-stat-active .fl-stat-num { color: #10b981; }

/* ── Buttons ─────────────────────────────────────── */
.fl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface3);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.fl-btn:hover { background: var(--surface); border-color: var(--accent); }
.fl-btn:active { transform: translateY(1px); }
.fl-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.fl-btn-primary {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  border-color: transparent;
  color: #fff;
}
.fl-btn-primary:hover {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  border-color: transparent;
}

.fl-btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted2);
  padding: 7px 10px;
}
.fl-btn-ghost:hover { color: var(--text); background: var(--surface3); border-color: var(--accent); }

/* ── Toolbar ─────────────────────────────────────── */
.fl-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}
.fl-toolbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 360px;
}
.fl-toolbar-search svg { color: var(--muted); flex-shrink: 0; }
.fl-toolbar-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
}
.fl-select {
  padding: 7px 28px 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface3) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 8px center;
  background-size: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.fl-select:hover { border-color: var(--accent); }

/* ── Body (cards grid) ───────────────────────────── */
.fl-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px;
}
.fl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ── Card ────────────────────────────────────────── */
.fl-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s, transform .1s;
}
.fl-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.fl-card-active {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.03), var(--surface2));
}
.fl-card-active:hover { border-color: #10b981; }

.fl-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fl-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.fl-card-info { flex: 1; min-width: 0; }
.fl-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fl-role {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Toggle switch (active/inactive) */
.fl-toggle-btn {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface3);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background .15s, border-color .15s;
}
.fl-toggle-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: left .18s, background .18s;
}
.fl-toggle-btn.on {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
}
.fl-toggle-btn.on .fl-toggle-knob {
  left: 17px;
  background: #10b981;
}
.fl-toggle-btn:hover { border-color: var(--accent); }

/* Card body */
.fl-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fl-email {
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fl-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fl-skill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #06b6d4;
  font-weight: 600;
}
.fl-skill-more {
  background: var(--surface3);
  border-color: var(--border);
  color: var(--muted);
}
.fl-skills-empty {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

/* Card foot */
.fl-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.fl-rate {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.fl-rate span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}
.fl-actions {
  display: flex;
  gap: 4px;
}
.fl-edit-btn,
.fl-delete-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted2);
  padding: 5px 7px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s, border-color .12s;
}
.fl-edit-btn:hover  { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.fl-delete-btn:hover { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

/* ── Empty / placeholder / error ────────────────── */
.fl-placeholder,
.fl-empty,
.fl-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}
.fl-empty-title { font-size: 18px; font-weight: 700; color: var(--text); }
.fl-empty-sub { font-size: 13px; color: var(--muted); max-width: 360px; }
.fl-error { color: var(--red); }

/* ── Drawer (add/edit form) ─────────────────────── */
.fl-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.fl-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.fl-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 9001;
  transform: translateX(100%);
  transition: transform .25s ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}
.fl-drawer.open { transform: translateX(0); }

.fl-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.fl-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.fl-drawer-close {
  background: transparent;
  border: none;
  color: var(--muted2);
  font-size: 24px;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .12s, color .12s;
}
.fl-drawer-close:hover { background: var(--surface3); color: var(--text); }

.fl-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fl-drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}

/* ── Form ────────────────────────────────────────── */
.fl-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fl-form-row label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fl-form-row input,
.fl-form-row select,
.fl-form-row textarea {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface3);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .12s, background .12s;
}
.fl-form-row input:focus,
.fl-form-row select:focus,
.fl-form-row textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.fl-form-row textarea { resize: vertical; min-height: 60px; font-family: inherit; }

.fl-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Skill suggestion pills (form içinde) */
.fl-skill-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.fl-skill-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--muted2);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.fl-skill-pill:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: #06b6d4;
  color: #06b6d4;
}

/* ── App switcher button rengi (cyan) ─────────────── */
.app-sw-freelancers.app-sw-active {
  background: rgba(6, 182, 212, .1);
  border-color: rgba(6, 182, 212, .35);
  color: #22d3ee;
}
