/* Finance Courses – אזור אישי / עורך */
.fc-dash, .fc-auth {
	--fcd-brand: #4f46e5;
	--fcd-brand2: #7c3aed;
	--fcd-ink: #0f172a;
	--fcd-mut: #64748b;
	--fcd-line: #e2e8f0;
	--fcd-bg: #f8fafc;
	--fcd-card: #ffffff;
	--fcd-radius: 14px;
	direction: rtl;
	text-align: right;
	font-family: "Heebo", sans-serif;
	color: var(--fcd-ink);
	width: 100%;
	margin: 0 auto;
	padding: 4px clamp(8px, 3vw, 32px);
}
.fc-auth { max-width: 440px; }
.fc-dash { min-height: 80vh; }
.fc-dash * { box-sizing: border-box; }

/* ---------- כפתורים (reset – לא לרשת מעיצוב האתר) ---------- */
.fc-dash button,
.fc-dash .fc-btn,
.fc-leads button,
.fc-leads .fc-btn,
.fc-auth button,
.fc-auth .fc-btn {
	font-family: inherit; font-size: 1rem; line-height: 1.2;
	-webkit-appearance: none; appearance: none; box-shadow: none;
	text-transform: none; letter-spacing: normal;
}

/* ---------- כותרת ---------- */
.fc-dash__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}
.fc-dash__hello { margin: 0 0 4px; font-size: 1.8rem; }
.fc-dash__sub { margin: 0; opacity: .7; }

/* ---------- כפתורים (מוגן מפני Elementor/תמה) ---------- */
.fc-dash .fc-btn, .fc-auth .fc-btn, .fc-leads .fc-btn,
.fc-dash a.fc-btn, .fc-auth a.fc-btn,
.fc-dash button.fc-btn, .fc-auth button.fc-btn {
	position: relative !important;
	display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
	width: auto !important; min-height: 0 !important;
	background: linear-gradient(135deg, var(--fcd-brand), var(--fcd-brand2)) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	line-height: 1.2 !important;
	padding: 12px 26px !important;
	border-radius: 12px !important;
	border: none !important;
	cursor: pointer !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: .2px !important;
	box-shadow: 0 6px 18px -4px rgba(79,70,229,.5), inset 0 1px 0 rgba(255,255,255,.2) !important;
	transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease, filter .18s ease !important;
	overflow: hidden !important;
	-webkit-appearance: none !important; appearance: none !important;
}
.fc-btn::after { display: none !important; }
.fc-dash .fc-btn:hover, .fc-auth .fc-btn:hover, .fc-leads .fc-btn:hover,
.fc-dash a.fc-btn:hover, .fc-auth a.fc-btn:hover,
.fc-dash button.fc-btn:hover, .fc-auth button.fc-btn:hover {
	transform: translateY(-3px) !important;
	box-shadow: 0 14px 30px -6px rgba(79,70,229,.6), inset 0 1px 0 rgba(255,255,255,.25) !important;
	filter: brightness(1.05) !important;
	color: #fff !important;
}
.fc-dash .fc-btn:active, .fc-auth .fc-btn:active { transform: translateY(-1px) scale(.98) !important; }
.fc-dash .fc-btn--lg, .fc-auth .fc-btn--lg { padding: 15px 38px !important; font-size: 1.08rem !important; border-radius: 14px !important; }
.fc-dash .fc-btn--ghost, .fc-auth .fc-btn--ghost, .fc-leads .fc-btn--ghost,
.fc-dash a.fc-btn--ghost, .fc-dash button.fc-btn--ghost {
	background: var(--fcd-card) !important; color: var(--fcd-brand) !important;
	border: 1.5px solid var(--fcd-line) !important; box-shadow: 0 2px 8px rgba(15,23,42,.05) !important;
}
.fc-btn--ghost::after { display: none !important; }
.fc-dash .fc-btn--ghost:hover, .fc-auth .fc-btn--ghost:hover {
	background: #f5f3ff !important; border-color: var(--fcd-brand) !important; color: var(--fcd-brand) !important;
	box-shadow: 0 8px 20px -6px rgba(79,70,229,.3) !important;
}
.fc-dash .fc-btn[disabled], .fc-auth .fc-btn[disabled] { opacity: .55 !important; cursor: default !important; transform: none !important; box-shadow: none !important; filter: grayscale(.3) !important; }
.fc-btn[disabled]::after { display: none !important; }
.fc-dash .fc-link, .fc-auth .fc-link, .fc-leads .fc-link {
	background: none !important; border: none !important; cursor: pointer !important;
	color: var(--fcd-brand) !important; font-weight: 600 !important; padding: 6px 10px !important; border-radius: 8px !important;
	text-decoration: none !important; font-family: inherit !important; font-size: .95rem !important; box-shadow: none !important;
	display: inline-flex !important; align-items: center !important; width: auto !important;
}
.fc-dash .fc-link:hover, .fc-auth .fc-link:hover { background: rgba(79,70,229,.08) !important; }
.fc-dash .fc-link--danger, .fc-auth .fc-link--danger { color: #dc2626 !important; }
.fc-dash .fc-link--danger:hover { background: rgba(220,38,38,.08) !important; }

/* ---------- רשימת קורסים ---------- */
.fc-dash__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.fc-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	background: var(--fcd-card);
	border: 1px solid var(--fcd-line);
	border-radius: 14px;
	padding: 16px 20px;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.fc-row:hover { transform: translateX(-4px); box-shadow: 0 10px 28px -12px rgba(15,23,42,.2); border-color: #cbd5e1; }
.fc-row__main { display: flex; align-items: center; gap: 12px; }
.fc-row__title { font-weight: 700; font-size: 1.05rem; }
.fc-status { font-size: .78rem; padding: 3px 12px; border-radius: 999px; font-weight: 600; }
.fc-status--ok { background: #dcfce7; color: #166534; }
.fc-status--pending { background: #fef3c7; color: #92400e; }
.fc-status--draft { background: #e5e7eb; color: #374151; }
.fc-row__actions { display: flex; gap: 6px; }

/* ---------- עורך ---------- */
.fc-editor {
	background: var(--fcd-card);
	border: 1px solid var(--fcd-line);
	border-radius: 22px;
	padding: 28px;
	box-shadow: 0 20px 60px -20px rgba(15,23,42,.15);
}
.fc-editor__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.fc-editor__head h2 { margin: 0; }
.fc-editor__layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 980px) { .fc-editor__layout { grid-template-columns: 1fr; } }

/* ---------- טאבים ---------- */
.fc-tabs { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; background: #eef2f7; padding: 6px; border-radius: 14px; }
.fc-dash .fc-tab {
	background: none !important; border: none !important; cursor: pointer !important;
	padding: 9px 18px !important; font-weight: 700 !important; color: var(--fcd-mut) !important;
	border-radius: 10px !important; transition: all .18s ease !important; box-shadow: none !important;
	font-family: inherit !important; font-size: .95rem !important; width: auto !important; min-height: 0 !important;
}
.fc-dash .fc-tab:hover { color: var(--fcd-ink) !important; background: rgba(255,255,255,.6) !important; }
.fc-dash .fc-tab.is-active { color: var(--fcd-brand) !important; background: var(--fcd-card) !important; box-shadow: 0 3px 10px rgba(15,23,42,.08) !important; }
.fc-pane { display: none; }
.fc-pane.is-active { display: block; animation: fcFade .25s ease; }
@keyframes fcFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- שדות ---------- */
.fc-req { color: #dc2626; font-weight: 800; }
.fc-legend { font-size: .85rem; color: var(--fcd-mut); margin: 0 0 14px; }
.fc-hint { font-size: .82rem; color: var(--fcd-mut); margin: -8px 0 14px; font-weight: 400; }
.fc-field.is-missing input,
.fc-field.is-missing textarea { border-color: #dc2626 !important; background: #fef2f2 !important; box-shadow: 0 0 0 4px rgba(220,38,38,.1) !important; }
.fc-field { display: block; margin-bottom: 18px; font-weight: 700; }
.fc-field__label { display: block; margin-bottom: 6px; font-size: .92rem; }
.fc-field input[type="text"],
.fc-field input[type="number"],
.fc-field input[type="date"],
.fc-field input[type="time"],
.fc-field input[type="email"],
.fc-field input[type="password"],
.fc-field input[type="url"],
.fc-field select,
.fc-field textarea {
	width: 100%;
	margin-top: 6px;
	padding: 12px 14px;
	border: 1.5px solid var(--fcd-line);
	border-radius: 11px;
	font-family: inherit;
	font-size: .98rem;
	font-weight: 500;
	background: var(--fcd-bg);
	color: var(--fcd-ink);
	transition: border-color .18s, box-shadow .18s, background .18s;
}
.fc-field input:hover, .fc-field select:hover, .fc-field textarea:hover { border-color: #cbd5e1; }
.fc-field input:focus, .fc-field select:focus, .fc-field textarea:focus {
	outline: none; border-color: var(--fcd-brand); background: #fff;
	box-shadow: 0 0 0 4px rgba(79,70,229,.14);
}
.fc-field select {
	appearance: none; -webkit-appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: left 14px center; padding-left: 38px;
}
.fc-field input[type="color"] {
	width: 100%; height: 52px; margin-top: 6px;
	border: 1.5px solid var(--fcd-line); border-radius: 11px; cursor: pointer; padding: 4px;
	background: var(--fcd-bg); transition: border-color .18s, box-shadow .18s;
}
.fc-field input[type="color"]:hover { border-color: var(--fcd-brand); box-shadow: 0 4px 12px rgba(79,70,229,.15); }
.fc-field textarea { resize: vertical; min-height: 90px; }
.fc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 520px) { .fc-grid-2 { grid-template-columns: 1fr; } }

/* ---------- מדיה ---------- */
.fc-media { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.fc-media img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--fcd-line); }

/* ---------- סילבוס עורך ---------- */
.fc-syl-edit { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.fc-syl-row {
	display: grid;
	grid-template-columns: 20px 1fr 1fr;
	gap: 8px;
	align-items: start;
	background: #f8f9fb;
	border: 1px solid var(--fcd-line);
	border-radius: 12px;
	padding: 12px;
}
.fc-syl-handle { color: #bbb; cursor: grab; padding-top: 10px; }
.fc-syl-row .syl-content { grid-column: 2 / 4; }
.fc-syl-row .syl-remove { grid-column: 1 / 4; justify-self: start; }
.fc-syl-row input, .fc-syl-row textarea {
	width: 100%; padding: 10px 12px; border: 1.5px solid var(--fcd-line); border-radius: 9px;
	font-family: inherit; font-weight: 500; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.fc-syl-row input:focus, .fc-syl-row textarea:focus { outline: none; border-color: var(--fcd-brand); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }

/* ---------- בורר תבנית (mockup cards) ---------- */
.fc-template-picker {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 16px;
	margin-top: 10px;
}
.fc-tpl-option { cursor: pointer; display: block; }
.fc-tpl-option input { position: absolute; opacity: 0; pointer-events: none; }

.fc-tpl-card {
	position: relative;
	display: flex; flex-direction: column;
	background: linear-gradient(var(--fcd-card), var(--fcd-card)) padding-box,
	            var(--fcd-line) border-box;
	border: 2px solid transparent;
	border-radius: 16px;
	overflow: hidden;
	transition: transform .28s cubic-bezier(.34,1.4,.64,1), box-shadow .28s ease;
	box-shadow: 0 2px 10px rgba(15,23,42,.05);
}
.fc-tpl-option:hover .fc-tpl-card {
	transform: translateY(-6px) scale(1.02);
	box-shadow: 0 20px 40px -12px rgba(79,70,229,.35);
}

/* מסך מדומה */
.fc-tpl-screen {
	position: relative;
	aspect-ratio: 4 / 3;
	background: radial-gradient(120% 120% at 20% 0, #eef2ff, #f8fafc 60%);
	display: flex; align-items: center; justify-content: center;
	padding: 22px 16px 14px;
	overflow: hidden;
}
.fc-tpl-chrome { position: absolute; top: 9px; inset-inline-start: 12px; display: flex; gap: 5px; }
.fc-tpl-chrome i { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; display: block; }
.fc-tpl-chrome i:nth-child(1) { background: #fca5a5; }
.fc-tpl-chrome i:nth-child(2) { background: #fcd34d; }
.fc-tpl-chrome i:nth-child(3) { background: #86efac; }
.fc-tpl-wf { color: var(--fcd-brand); width: 82%; height: 82%; display: block; filter: drop-shadow(0 4px 10px rgba(79,70,229,.18)); transition: transform .3s ease; }
.fc-tpl-wf .fc-wf, .fc-tpl-wf svg { width: 100%; height: 100%; }
.fc-tpl-option:hover .fc-tpl-wf { transform: scale(1.06) rotate(-1deg); }

/* badge וי */
.fc-tpl-check {
	position: absolute; top: 8px; inset-inline-end: 8px;
	width: 26px; height: 26px; border-radius: 50%;
	background: linear-gradient(135deg, var(--fcd-brand), var(--fcd-brand2));
	color: #fff; display: flex; align-items: center; justify-content: center;
	transform: scale(0) rotate(-45deg); transition: transform .3s cubic-bezier(.34,1.56,.64,1);
	box-shadow: 0 4px 12px rgba(79,70,229,.5);
}
.fc-tpl-check svg { width: 15px; height: 15px; }

/* meta */
.fc-tpl-meta { padding: 11px 14px 13px; text-align: center; border-top: 1px solid #f1f5f9; }
.fc-tpl-name { display: block; font-size: .95rem; font-weight: 800; color: var(--fcd-ink); }
.fc-tpl-tag { display: block; font-size: .72rem; color: var(--fcd-mut); font-weight: 500; margin-top: 2px; line-height: 1.3; }

/* מצב נבחר */
.fc-tpl-option:has(input:checked) .fc-tpl-card {
	background: linear-gradient(var(--fcd-card), var(--fcd-card)) padding-box,
	            linear-gradient(135deg, var(--fcd-brand), var(--fcd-brand2)) border-box;
	box-shadow: 0 16px 36px -10px rgba(79,70,229,.45);
}
.fc-tpl-option:has(input:checked) .fc-tpl-screen { background: radial-gradient(120% 120% at 20% 0, #e0e7ff, #eef2ff 60%); }
.fc-tpl-option:has(input:checked) .fc-tpl-check { transform: scale(1) rotate(0); }
.fc-tpl-option:has(input:checked) .fc-tpl-name { color: var(--fcd-brand); }
.fc-tpl-option:has(input:focus-visible) .fc-tpl-card { outline: 2px solid var(--fcd-brand); outline-offset: 2px; }

.fc-tpl-explain {
	margin-top: 16px; padding: 14px 18px;
	background: linear-gradient(135deg, #f5f3ff, #eef2ff);
	border-radius: 12px; border-inline-start: 4px solid var(--fcd-brand);
	font-size: .92rem; color: #334155; min-height: 20px; font-weight: 500; line-height: 1.5;
}

/* ---------- שורת שו"ת בעורך ---------- */
.fc-faq-row { grid-template-columns: 20px 1fr; }
.fc-faq-row .faq-q { grid-column: 2; }
.fc-faq-row .faq-a { grid-column: 2; }
.fc-faq-row .faq-remove { grid-column: 1 / 3; justify-self: start; }

/* ---------- בורר תבנית (legacy swatch fallback) ---------- */
.fc-tpl-swatch { width: 34px; height: 34px; border-radius: 8px; flex: 0 0 auto; }

/* ---------- ערכות מוכנות ---------- */
.fc-presets { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fc-dash .fc-preset {
	border: 1.5px solid var(--fcd-line) !important; background: var(--fcd-card) !important; border-radius: 999px !important;
	padding: 8px 16px !important; cursor: pointer !important; font-size: .85rem !important; font-weight: 700 !important; font-family: inherit !important;
	transition: all .18s ease !important; color: var(--fcd-ink) !important; box-shadow: none !important; width: auto !important; min-height: 0 !important;
}
.fc-dash .fc-preset:hover { border-color: var(--fcd-brand) !important; color: var(--fcd-brand) !important; box-shadow: 0 4px 12px rgba(79,70,229,.18) !important; transform: translateY(-1px) !important; }

/* ---------- footer ---------- */
.fc-form__footer { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.fc-form__msg { font-weight: 600; }
.fc-form__msg.is-error { color: #dc2626; }
.fc-form__msg.is-ok { color: #16a34a; }

/* ---------- תצוגה מקדימה ---------- */
.fc-preview-wrap {
	position: sticky; top: 20px;
	border: 1px solid var(--fcd-line); border-radius: 14px; overflow: hidden;
	background: #f3f4f6; align-self: start;
}
.fc-preview-bar {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px 14px; background: #fff; border-bottom: 1px solid #e6e8ec;
	font-weight: 600; font-size: .9rem;
}
.fc-preview-modes { display: flex; gap: 4px; }
.fc-pv-mode { border: none; background: #eef0f3; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.fc-pv-mode.is-active { background: var(--fcd-brand); color:#fff; }
.fc-preview-frame {
	height: 640px; overflow-y: auto;
	padding: 16px;
	transition: max-width .2s ease;
}
.fc-preview-frame.is-mobile { max-width: 390px; margin: 0 auto; }
.fc-preview-empty { text-align: center; padding: 60px 20px; color: #999; }

/* ---------- ריק ---------- */
.fc-empty {
	text-align: center; padding: 40px; background: #f6f7f9;
	border-radius: 14px; color: #666;
}

/* ---------- auth ---------- */
.fc-auth { max-width: 420px; }
.fc-auth h2 { margin: 0 0 18px; }
.fc-auth__form label { display: block; margin-bottom: 14px; font-weight: 600; }
.fc-auth__form input { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 9px; font-family: inherit; }
.fc-auth__msg { margin-top: 10px; font-weight: 600; }
.fc-auth__alt { margin-top: 14px; opacity: .7; font-size: .9rem; }
.fc-auth .fc-hint { margin: -8px 0 14px; }
.fc-auth .fc-req { color: #dc2626; }

/* ---------- Loader ---------- */
.fc-loader {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(255,255,255,.78);
	display: none;
	flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	backdrop-filter: blur(3px);
}
.fc-loader.is-active { display: flex; }
.fc-loader[hidden] { display: none; }
.fc-loader.is-active[hidden] { display: flex; }
.fc-loader__text { font-weight: 700; color: #1f6feb; }
.fc-spinner {
	width: 52px; height: 52px; border-radius: 50%;
	border: 5px solid #dbe6fb; border-top-color: #1f6feb;
	animation: fc-spin .8s linear infinite;
}
@keyframes fc-spin { to { transform: rotate(360deg); } }

/* ספינר קטן בתוך כפתורים / תצוגה מקדימה */
.fc-spinner--sm { width: 18px; height: 18px; border-width: 3px; display: inline-block; vertical-align: middle; }
.fc-preview-bar .fc-spinner--sm { margin-inline-start: 8px; }
.fc-preview-loading { position: relative; }
.fc-preview-loading::after {
	content: ""; position: absolute; inset: 0;
	background: rgba(255,255,255,.6);
}

/* ---------- ניהול לידים ---------- */
.fc-leads { direction: rtl; font-family: "Heebo", sans-serif; max-width: 1200px; margin: 0 auto; color: #1a1a1a; }
.fc-leads__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.fc-leads__top h1 { margin: 0; }
.fc-leads__group { margin-bottom: 30px; }
.fc-leads__course {
	display: flex; align-items: center; gap: 12px; font-size: 1.3rem;
	border-right: 4px solid #1f6feb; padding-right: 12px; margin-bottom: 12px;
}
.fc-leads__count { font-size: .8rem; background: #eef2ff; color: #1f6feb; padding: 3px 12px; border-radius: 999px; font-weight: 600; }
.fc-leads__table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--fcd-line); border-radius: 12px; }
.fc-leads__table { width: 100%; border-collapse: collapse; min-width: 720px; }
.fc-leads__table th, .fc-leads__table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid #f0f1f3; font-size: .92rem; }
.fc-leads__table th { background: #f8f9fb; font-weight: 700; }
.fc-leads__table a { color: #1f6feb; text-decoration: none; }
.fc-lead-msg { max-width: 220px; white-space: pre-wrap; }
.fc-lead-status { padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; }
.fc-lead-row--new { background: #fffbeb; }
.fc-lead-row--contacted { background: #eff6ff; }
.fc-lead-row--closed { background: #f0fdf4; opacity: .7; }

@media (max-width: 720px) {
	.fc-leads__table { min-width: 0; }
	.fc-leads__table thead { display: none; }
	.fc-leads__table tr { display: block; border-bottom: 2px solid #e6e8ec; padding: 8px 0; }
	.fc-leads__table td { display: flex; justify-content: space-between; border: none; padding: 6px 14px; }
	.fc-leads__table td::before { content: attr(data-label); font-weight: 700; opacity: .6; }
	.fc-lead-msg { max-width: none; }
}
