/* Favrskov Erhverv – Bestyrelsens dashboard (selvstændig styling, virker i wp-admin og frontend) */

.feb-dash {
	--feb-border: #dcdcde;
	--feb-muted: #646970;
	--feb-bg: #fff;
	--feb-ok: #2a9d54;
	--feb-near: #dba617;
	--feb-behind: #d63638;
	--feb-blue: #2a72b5;
	color: #1d2327;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 1180px;
	margin: 0 auto;
}
.feb-dash * { box-sizing: border-box; }
.feb-muted { color: var(--feb-muted); font-size: 12px; }

.feb-head { margin-bottom: 14px; }
.feb-title { margin: 0 0 2px; font-size: 22px; }
.feb-sub { color: var(--feb-muted); font-size: 13px; }

.feb-gate { padding: 20px; border: 1px solid #c5d9ed; background: #f0f6fc; border-radius: 8px; }

/* Filtre */
.feb-filters {
	display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
	background: var(--feb-bg); border: 1px solid var(--feb-border);
	border-radius: 10px; padding: 14px 16px; margin-bottom: 22px;
}
.feb-filter { display: flex; flex-direction: column; gap: 4px; }
.feb-filter label { font-size: 11px; font-weight: 600; color: var(--feb-muted); text-transform: uppercase; letter-spacing: .02em; }
.feb-filter select, .feb-filter input {
	height: 34px; padding: 4px 8px; border: 1px solid #8c8f94; border-radius: 6px; background: #fff; font-size: 14px;
}
.feb-filter-grow { flex: 1 1 220px; }
.feb-filter-grow input { width: 100%; }
.feb-filter-actions { margin-left: auto; }
.feb-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; height: 40px !important; padding: 0 24px !important; border-radius: 8px !important; line-height: 1 !important; box-sizing: border-box !important; border: 1px solid var(--feb-blue); background: #fff; color: var(--feb-blue); cursor: pointer; font-size: 14px; font-weight: 600; }
.feb-btn-primary { background: var(--feb-blue); color: #fff; border: 0 !important; }

/* KPI-kort */
.feb-kpis { margin-bottom: 26px; }
.feb-kpis h3 { margin: 0 0 2px; }
.feb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 12px; }
.feb-card { background: var(--feb-bg); border: 1px solid var(--feb-border); border-radius: 10px; padding: 14px 16px; }
.feb-card-label { font-size: 12px; color: var(--feb-muted); min-height: 30px; }
.feb-card-num { font-size: 26px; font-weight: 700; line-height: 1.2; margin: 2px 0 10px; }
.feb-card-num .feb-target { font-size: 13px; font-weight: 400; color: #8c8f94; }

/* Pace-bjælke: fyld = faktisk, markør = forventet niveau */
.feb-track { position: relative; height: 10px; background: #f0f0f1; border-radius: 6px; overflow: visible; }
.feb-fill { display: block; height: 100%; border-radius: 6px; }
.feb-fill.ok { background: var(--feb-ok); }
.feb-fill.near { background: var(--feb-near); }
.feb-fill.behind { background: var(--feb-behind); }
.feb-fill.na { background: #c3c4c7; }
.feb-marker { position: absolute; top: -3px; width: 2px; height: 16px; background: #1d2327; border-radius: 2px; }
.feb-marker::after { content: ""; position: absolute; top: -4px; left: -3px; border: 4px solid transparent; border-top-color: #1d2327; }

.feb-badge { margin-top: 8px; font-size: 12px; font-weight: 600; }
.feb-badge.ok { color: var(--feb-ok); }
.feb-badge.near { color: #9a7400; }
.feb-badge.behind { color: var(--feb-behind); }
.feb-badge.na { color: var(--feb-muted); font-weight: 400; }

/* Grafer */
.feb-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.feb-panel { background: var(--feb-bg); border: 1px solid var(--feb-border); border-radius: 10px; padding: 16px 18px; }
.feb-panel h3 { margin: 0 0 10px; }
.feb-chart-box { position: relative; height: 260px; width: 100%; }
.feb-chart-box canvas { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; }
@media (max-width: 960px) { .feb-charts { grid-template-columns: 1fr; } }

/* Liste */
.feb-list h3 { margin: 0 0 10px; }
.feb-count { display: inline-block; min-width: 22px; padding: 1px 8px; margin-left: 4px; font-size: 13px; background: #eef1f4; border-radius: 12px; color: var(--feb-muted); vertical-align: middle; }
.feb-table-wrap { overflow-x: auto; border: 1px solid var(--feb-border); border-radius: 10px; background: var(--feb-bg); }
.feb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.feb-table th, .feb-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f0f0f1; vertical-align: top; }
.feb-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--feb-muted); background: #fafafa; }
.feb-table tr:last-child td { border-bottom: none; }
.feb-empty { text-align: center; color: var(--feb-muted); padding: 24px; }

.feb-trappe { display: inline-flex; gap: 3px; }
.feb-step { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.feb-step.on { background: var(--feb-ok); }
.feb-step.off { background: #e0e0e0; }

.feb-pagination { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.feb-page { padding: 6px 12px; border: 1px solid var(--feb-border); border-radius: 6px; text-decoration: none; color: var(--feb-blue); background: #fff; }
.feb-page.current { background: var(--feb-blue); color: #fff; border-color: var(--feb-blue); }
.feb-page.disabled { color: #c3c4c7; pointer-events: none; }
.feb-page-info { font-size: 13px; color: var(--feb-muted); }

/* Tilfredshed */
.feb-sat { margin-bottom: 26px; }
.feb-sat h3 { margin: 0 0 12px; }
.feb-sat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.feb-light-card { grid-column: span 2; }
@media (max-width: 760px) { .feb-light-card { grid-column: span 1; } }

.feb-light-card { display: flex; align-items: center; gap: 14px; background: var(--feb-bg); border: 1px solid var(--feb-border); border-radius: 10px; padding: 16px; border-left-width: 6px; }
.feb-light-card.feb-light-green { border-left-color: var(--feb-ok); }
.feb-light-card.feb-light-yellow { border-left-color: var(--feb-near); }
.feb-light-card.feb-light-red { border-left-color: var(--feb-behind); }
.feb-light-card.feb-light-na { border-left-color: #c3c4c7; }
.feb-light-dot { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 3px rgba(0,0,0,.06); }
.feb-light-green .feb-light-dot { background: var(--feb-ok); }
.feb-light-yellow .feb-light-dot { background: var(--feb-near); }
.feb-light-red .feb-light-dot { background: var(--feb-behind); }
.feb-light-na .feb-light-dot { background: #c3c4c7; }
.feb-light-status { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.feb-light-green .feb-light-status { color: var(--feb-ok); }
.feb-light-yellow .feb-light-status { color: #9a7400; }
.feb-light-red .feb-light-status { color: var(--feb-behind); }
.feb-light-na .feb-light-status { color: var(--feb-muted); }
.feb-light-num { font-size: 28px; font-weight: 700; line-height: 1.1; }

.feb-stat { background: var(--feb-bg); border: 1px solid var(--feb-border); border-radius: 10px; padding: 14px 16px; }
.feb-stat-label { font-size: 12px; color: var(--feb-muted); margin-bottom: 6px; }
.feb-stat-num { font-size: 26px; font-weight: 700; line-height: 1.1; margin-bottom: 4px; }
.feb-mini-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-left: 4px; }
.feb-mini-dot.feb-light-green { background: var(--feb-ok); }
.feb-mini-dot.feb-light-yellow { background: var(--feb-near); }
.feb-mini-dot.feb-light-red { background: var(--feb-behind); }
.feb-mini-dot.feb-light-na { background: #c3c4c7; }

.feb-quotes-title { margin: 20px 0 10px; font-size: 14px; }
.feb-quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.feb-quote { position: relative; margin: 0; background: var(--feb-bg); border: 1px solid var(--feb-border); border-radius: 10px; padding: 16px 16px 14px; }
.feb-quote-dot { position: absolute; top: 14px; right: 14px; width: 12px; height: 12px; border-radius: 50%; }
.feb-quote-dot.feb-light-green { background: var(--feb-ok); }
.feb-quote-dot.feb-light-yellow { background: var(--feb-near); }
.feb-quote-dot.feb-light-red { background: var(--feb-behind); }
.feb-quote-dot.feb-light-na { background: #c3c4c7; }
.feb-quote blockquote { margin: 0 0 10px; font-size: 14px; line-height: 1.5; font-style: italic; padding-right: 18px; }
.feb-quote blockquote::before { content: "\201C"; }
.feb-quote blockquote::after { content: "\201D"; }
.feb-quote figcaption { font-size: 13px; font-weight: 600; }

/* Tilfredshedsskema (besvarelsesside) */
.fe-eval-form { max-width: 560px; background: var(--feb-bg); border: 1px solid var(--feb-border); border-radius: 12px; padding: 24px; }
.fe-eval-intro { margin: 0 0 18px; color: var(--feb-muted); }
.fe-eval-field { display: block; margin: 0 0 16px; }
.fe-eval-field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.fe-eval-field em { color: var(--feb-behind); font-style: normal; }
.fe-eval-field input[type=text], .fe-eval-field select, .fe-eval-field textarea {
	width: 100%; padding: 9px 10px; border: 1px solid #8c8f94; border-radius: 6px; font-size: 15px; background: #fff;
}
.fe-eval-error { margin: 0 0 16px; padding: 10px 14px; background: #fcf0f1; border: 1px solid #f0c3c5; border-left: 4px solid var(--feb-behind); border-radius: 6px; }
.fe-eval-thanks { background: var(--feb-bg); border: 1px solid #c5d9ed; border-left: 6px solid var(--feb-ok); border-radius: 12px; padding: 22px; max-width: 560px; }
.fe-eval-thanks h3 { margin-top: 0; }
.fe-eval-hp { position: absolute !important; left: -5000px !important; height: 0; overflow: hidden; }
.fe-eval-form .feb-btn-primary { font-size: 15px !important; padding: 0 28px !important; height: 44px !important; }

/* Detalje-modal (klik på graf) */
.feb-modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000; display: none; }
.feb-modal.open { display: block; }
.feb-modal-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.45); }
.feb-modal-panel { position: relative; max-width: 780px; margin: 6vh auto; background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 12px 44px rgba(0,0,0,.28); max-height: 82vh; overflow: auto; }
.feb-modal-close { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--feb-muted); }
.feb-modal-title { margin: 0 34px 16px 0; font-size: 18px; }
.feb-modal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.feb-modal-table th, .feb-modal-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--feb-border); }
.feb-modal-table th { color: var(--feb-muted); font-weight: 600; }
.feb-modal-table tbody tr:hover { background: var(--feb-bg); }

/* Medlemsoversigt */
.fe-medl { max-width: 1180px; margin: 0 auto; }
.fe-medl-group { margin: 0 0 44px; }
.fe-medl-title { font-size: 24px; margin: 0 0 20px; padding-bottom: 8px; border-bottom: 2px solid var(--feb-border); }
.fe-medl-title .fe-medl-count { font-size: 15px; font-weight: 400; color: var(--feb-muted); }
.fe-medl-group.fe-medl-plus .fe-medl-title { border-bottom-color: #dba617; }
.fe-medl-group.fe-medl-netvaerk .fe-medl-title { border-bottom-color: #2a72b5; }
.fe-medl-group.fe-medl-basis .fe-medl-title { border-bottom-color: #2a9d54; }

/* Rich visning (Plus, Netvaerk) */
.fe-medl-grid-rich { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.fe-medl-rich { background: #fff; border: 1px solid var(--feb-border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; }
.fe-medl-rich .fe-medl-logo-wrap { height: 80px; width: 100%; margin-bottom: 14px; line-height: 0; }
.fe-medl-rich .fe-medl-logo { display: block !important; width: 100% !important; height: 100% !important; max-width: 100% !important; object-fit: contain !important; object-position: left center; }
.fe-medl-rich .fe-medl-name { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.fe-medl-info { list-style: none; margin: 0; padding: 0; }
.fe-medl-info li { position: relative; padding-left: 24px; margin: 6px 0; font-size: 14px; line-height: 1.4; }
.fe-medl-info li::before { content: "\2713"; position: absolute; left: 0; top: 1px; color: #2a9d54; font-weight: 700; }
.fe-medl-info a { color: inherit; text-decoration: none; word-break: break-word; }
.fe-medl-info a:hover { text-decoration: underline; }
.fe-medl-info li.fe-medl-adr { color: var(--feb-muted); }
.fe-medl-plus .fe-medl-rich { border-top: 3px solid #dba617; }
.fe-medl-netvaerk .fe-medl-rich { border-top: 3px solid #2a72b5; }

/* Kompakt visning (Basis) */
.fe-medl-grid-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.fe-medl-compact { background: #fff; border: 1px solid var(--feb-border); border-radius: 8px; padding: 12px 14px; }
.fe-medl-compact .fe-medl-name { font-weight: 600; font-size: 14px; color: inherit; text-decoration: none; }
.fe-medl-compact a.fe-medl-name:hover { text-decoration: underline; }
.fe-medl-compact .fe-medl-by { font-size: 12px; color: var(--feb-muted); margin-top: 3px; }
.fe-medl-noimg { font-size: 16px; font-weight: 700; color: #1d2327; }

@media (max-width: 600px) {
	.fe-medl-grid-rich { grid-template-columns: 1fr; }
	.fe-medl-grid-compact { grid-template-columns: 1fr 1fr; }
}
