/* Freelance Management – app styles (admin + frontend) */
.flm-app {
	--flm-bg: #f6f6f4;
	--flm-surface: #ffffff;
	--flm-border: #e3e2de;
	--flm-text: #1d1d1b;
	--flm-muted: #6b6a66;
	--flm-primary: #1f2937;
	--flm-primary-text: #ffffff;
	--flm-accent: #2a78d6;
	--flm-income: #2a78d6;
	--flm-expense: #eb6834;
	--flm-red: #c0262d;
	--flm-green: #16794a;
	--flm-radius: 8px;
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	min-height: 100vh;
	background: var(--flm-bg);
	color: var(--flm-text);
	font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.flm-app *, .flm-app *::before, .flm-app *::after { box-sizing: border-box; }
.flm-context-admin { min-height: calc(100vh - 80px); margin: 10px 0 0 -10px; border: 1px solid var(--flm-border); border-radius: var(--flm-radius); overflow: hidden; }
.flm-admin-wrap { margin-right: 10px; }
body.flm-app-body { margin: 0; background: #f6f6f4; }
.flm-app a { color: var(--flm-accent); text-decoration: none; }
.flm-app a:hover { text-decoration: underline; }
.flm-app h1 { font-size: 24px; line-height: 1.25; margin: 0; font-weight: 650; }
.flm-app h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
.flm-app h3 { font-size: 14px; margin: 16px 0 8px; font-weight: 650; }
.flm-app [hidden] { display: none !important; }
.flm-app :focus-visible { outline: 2px solid var(--flm-accent); outline-offset: 2px; }

/* Navigation */
.flm-nav { background: #1d1d1b; color: #e9e8e3; padding: 16px 10px; position: sticky; top: 0; align-self: start; min-height: 100vh; overflow-y: auto; max-height: 100vh; }
.flm-context-admin .flm-nav { min-height: 100%; max-height: none; position: static; }
.flm-brand { font-weight: 700; font-size: 15px; padding: 4px 10px 16px; display: flex; gap: 8px; align-items: center; color: #fff; }
.flm-nav-group { margin-bottom: 14px; }
.flm-nav-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9c9b95; padding: 0 10px 4px; }
.flm-nav ul { list-style: none; margin: 0; padding: 0; }
.flm-nav a { display: flex; gap: 8px; align-items: center; color: #e9e8e3 !important; padding: 7px 10px; border-radius: 6px; font-size: 13.5px; }
.flm-nav a:hover { background: #2e2e2b; text-decoration: none !important; }
.flm-nav a.is-active { background: #3a3a36; color: #fff !important; font-weight: 600; }
.flm-nav .dashicons { font-size: 18px; width: 18px; height: 18px; opacity: .85; }
.flm-nav-foot { border-top: 1px solid #3a3a36; margin-top: 10px; padding-top: 10px; }
.flm-nav-toggle { display: none; }

/* Main */
.flm-main { padding: 24px 28px 60px; min-width: 0; }
.flm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.flm-sub { margin: 4px 0 0; color: var(--flm-muted); }
.flm-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.flm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--flm-border); border-radius: 6px; background: var(--flm-surface); color: var(--flm-text) !important; font: inherit; font-weight: 550; cursor: pointer; line-height: 1.3; text-decoration: none !important; white-space: nowrap; }
.flm-btn:hover { border-color: #b9b8b2; background: #fafaf8; }
.flm-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.flm-btn-primary { background: var(--flm-primary); border-color: var(--flm-primary); color: var(--flm-primary-text) !important; }
.flm-btn-primary:hover { background: #111827; border-color: #111827; }
.flm-btn-danger { color: var(--flm-red) !important; border-color: #f0c9cb; }
.flm-btn-danger:hover { background: #fdf2f2; border-color: var(--flm-red); }
.flm-btn-small { padding: 3px 9px; font-size: 12.5px; }
.flm-btn.is-active { background: #ecebe7; }
.flm-inline-form { display: inline; margin: 0; }

/* Cards & layout */
.flm-card { background: var(--flm-surface); border: 1px solid var(--flm-border); border-radius: var(--flm-radius); padding: 18px 20px; margin-bottom: 16px; }
.flm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.flm-cols > .flm-card { margin-bottom: 16px; }
.flm-layout-main-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.flm-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.flm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.flm-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.flm-grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 0 10px; }
.flm-grid-2-1 { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; }
.flm-nested { gap: 0 10px; }
.flm-empty-state { text-align: center; padding: 60px 20px; color: var(--flm-muted); }
.flm-empty-state .dashicons { font-size: 48px; width: 48px; height: 48px; }

/* Forms */
.flm-field { margin-bottom: 12px; min-width: 0; }
.flm-field > label, .flm-field > legend { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 4px; color: #3b3a37; }
fieldset.flm-field { border: 0; padding: 0; margin: 0 0 12px; }
.flm-app input[type=text], .flm-app input[type=email], .flm-app input[type=url], .flm-app input[type=number], .flm-app input[type=date], .flm-app input[type=time], .flm-app input[type=tel], .flm-app input[type=search], .flm-app input[type=password], .flm-app select, .flm-app textarea {
	width: 100%; max-width: 100%; padding: 7px 10px; border: 1px solid #cfcec9; border-radius: 6px; background: #fff; color: var(--flm-text); font: inherit; min-height: 36px; box-shadow: none;
}
.flm-app textarea { min-height: 60px; resize: vertical; }
.flm-app input[type=color] { width: 60px; height: 36px; padding: 2px; border: 1px solid #cfcec9; border-radius: 6px; }
.flm-app input:focus, .flm-app select:focus, .flm-app textarea:focus { border-color: var(--flm-accent); outline: 2px solid rgba(42,120,214,.2); outline-offset: 0; }
.flm-app input:disabled, .flm-app select:disabled, .flm-app textarea:disabled { background: #f3f3f1; color: var(--flm-muted); }
.flm-input-large { font-size: 17px !important; font-weight: 600; }
.flm-input-small { width: 70px !important; }
.flm-check label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 13.5px; }
.flm-check input { margin-top: 3px; }
.flm-help { display: block; color: var(--flm-muted); font-size: 12.5px; margin-top: 4px; }
.flm-form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 16px; }
.flm-stack { flex-direction: column; align-items: stretch; }
.flm-stack .flm-btn { justify-content: center; }
.flm-sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--flm-bg) 30%); padding: 14px 0; z-index: 5; }
.flm-danger-zone { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--flm-border); display: flex; gap: 8px; }
.flm-filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.flm-filterbar input[type=search], .flm-filterbar input[type=number], .flm-filterbar select { width: auto; min-width: 140px; }
.flm-filterbar input[type=number] { min-width: 100px; max-width: 120px; }
.flm-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--flm-border); border-radius: 999px; background: #fff; margin: 0 6px 6px 0; font-size: 13px; cursor: pointer; }
.flm-chip:has(input:checked) { background: #eef4fc; border-color: #9cc0ea; }
.flm-term-list { display: flex; flex-wrap: wrap; max-height: 150px; overflow: auto; margin-bottom: 6px; }
.flm-new-term { font-size: 13px !important; }
.flm-terms legend { font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.flm-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; }
.flm-check-grid label { display: flex; gap: 6px; align-items: center; font-size: 13px; padding: 3px 0; }
.flm-check-grid img { width: 32px; height: 32px; object-fit: cover; border-radius: 3px; }
.flm-scroll-box { max-height: 320px; overflow: auto; border: 1px solid var(--flm-border); border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; }
.flm-repeater-row { display: grid; gap: 8px; margin-bottom: 8px; align-items: start; }
.flm-event-row { grid-template-columns: 140px 100px 140px 1fr 1fr auto; }
.flm-remove-row { align-self: center; }

/* Media */
.flm-media-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0 0 12px; padding: 0; }
.flm-media-list li { width: 120px; font-size: 12px; text-align: center; }
.flm-media-list img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; display: block; border: 1px solid var(--flm-border); }
.flm-media-list .dashicons-media-document { font-size: 48px; width: 120px; height: 90px; display: block; line-height: 90px; color: var(--flm-muted); }
.flm-media-list label { display: flex; justify-content: center; gap: 4px; align-items: center; margin-top: 4px; }
.flm-filename { display: block; word-break: break-all; }
.flm-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.flm-thumbs img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; display: block; }

/* Tables */
.flm-table-wrap { overflow-x: auto; }
.flm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.flm-table th, .flm-table td { padding: 8px 10px; border-bottom: 1px solid #ecebe7; text-align: left; vertical-align: top; }
.flm-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--flm-muted); font-weight: 600; border-bottom: 1px solid var(--flm-border); white-space: nowrap; }
.flm-table tbody tr:hover { background: #fafaf8; }
.flm-table tfoot th, .flm-table tfoot td { border-top: 2px solid var(--flm-border); border-bottom: 0; }
.flm-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.flm-compact th, .flm-compact td { padding: 5px 8px; }
.flm-compact th { font-weight: 500; color: var(--flm-muted); }
.flm-table tr.is-late td { background: #fff6f5; }
.flm-table tr.is-done td, .flm-agenda li.is-done { opacity: .55; }
.flm-table tr.is-highlight td { background: #eef4fc; }
.flm-row-actions { white-space: nowrap; }
.flm-row-actions > * { margin-right: 4px; }
.flm-muted { color: var(--flm-muted); }
.flm-red { color: var(--flm-red) !important; }
.flm-green { color: var(--flm-green) !important; }

/* Badges */
.flm-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #ecebe7; color: #44433f; white-space: nowrap; }
.flm-badge-solo { background: #e6effb; color: #1d5aa5; }
.flm-badge-group { background: #fdeee6; color: #a3441a; }
.flm-badge-fair { background: #e6f6ef; color: #146c4c; }
.flm-badge-sold, .flm-badge-paid, .flm-badge-confirmed, .flm-badge-accepted, .flm-badge-subscribed, .flm-badge-sent { background: #e6f4ea; color: #146c3a; }
.flm-badge-reserved, .flm-badge-issued, .flm-badge-applied, .flm-badge-pending, .flm-badge-sending { background: #fff4d6; color: #7a5600; }
.flm-badge-overdue, .flm-badge-rejected, .flm-badge-cancelled, .flm-badge-unsubscribed, .flm-badge-bounced { background: #fbe9ea; color: #9b1c22; }
.flm-badge-draft, .flm-badge-paused, .flm-badge-idea { background: #ecebe7; color: #55544f; }
.flm-badge-deadline { background: #fbe9ea; color: #9b1c22; }
.flm-badge-setup, .flm-badge-teardown { background: #efeafc; color: #4a3aa8; }
.flm-badge-transport { background: #fff4d6; color: #7a5600; }
.flm-stars { color: #d39b00; letter-spacing: 1px; white-space: nowrap; }
.flm-stars-off { color: #dcdbd6; }

/* KPIs */
.flm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.flm-kpi { display: block; background: var(--flm-surface); border: 1px solid var(--flm-border); border-radius: var(--flm-radius); padding: 14px 16px; color: var(--flm-text) !important; text-decoration: none !important; }
.flm-kpi-label { display: block; font-size: 12.5px; color: var(--flm-muted); }
.flm-kpi strong { display: block; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.flm-kpi small { color: var(--flm-muted); }
.flm-kpi.is-negative strong { color: var(--flm-red); }
.flm-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.flm-tile { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px; border: 1px solid var(--flm-border); border-radius: 8px; color: var(--flm-text) !important; font-weight: 550; }
.flm-tile:hover { background: #fafaf8; text-decoration: none !important; }
.flm-tile .dashicons { color: var(--flm-accent); }

/* Notices */
.flm-notice { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border-left: 4px solid; background: #fff; }
.flm-notice-success { border-color: var(--flm-green); background: #f0f8f3; }
.flm-notice-error { border-color: var(--flm-red); background: #fdf2f2; }
.flm-notice-info { border-color: var(--flm-accent); background: #f1f6fd; }

/* Tabs */
.flm-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--flm-border); margin-bottom: 16px; flex-wrap: wrap; }
.flm-tabs a { padding: 8px 14px; color: var(--flm-muted) !important; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 550; text-decoration: none !important; }
.flm-tabs a.is-active { color: var(--flm-text) !important; border-bottom-color: var(--flm-primary); }
.flm-js .flm-tab-panel { display: none; }
.flm-js .flm-tab-panel.is-active { display: block; }

/* Agenda */
.flm-agenda { list-style: none; margin: 0 0 12px; padding: 0; }
.flm-agenda li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #f0efeb; flex-wrap: wrap; }
.flm-agenda-date { min-width: 92px; font-variant-numeric: tabular-nums; color: var(--flm-muted); font-size: 13px; }
.flm-agenda-kind { font-size: 11.5px; font-weight: 600; color: var(--flm-muted); text-transform: uppercase; letter-spacing: .04em; }
.flm-agenda small { color: var(--flm-muted); width: 100%; padding-left: 102px; }
.flm-agenda-overdue li { background: #fff6f5; padding-left: 6px; }

/* Calendar (shared with public) */
.flm-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.flm-legend .flm-cal-item { display: inline-block; }
.flm-sync summary { cursor: pointer; font-weight: 600; }

/* Artwork grid */
.flm-work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.flm-work { background: #fff; border: 1px solid var(--flm-border); border-radius: 8px; overflow: hidden; color: var(--flm-text) !important; text-decoration: none !important; display: flex; flex-direction: column; }
.flm-work:hover { border-color: #b9b8b2; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.flm-work img, .flm-work .flm-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #f0efeb; }
.flm-work .flm-noimg { display: flex; align-items: center; justify-content: center; font-size: 40px; color: #c9c8c2; height: auto; }
.flm-work-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.flm-work-body small { color: var(--flm-muted); }
.flm-work-meta { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.flm-price-small { font-size: 12px; color: var(--flm-muted); margin-left: auto; }
.flm-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.flm-pick { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--flm-border); border-radius: 6px; cursor: pointer; font-size: 13px; }
.flm-pick:has(input:checked) { border-color: var(--flm-accent); background: #f1f6fd; }
.flm-pick img, .flm-pick .flm-noimg { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; flex: none; }
.flm-pick span { display: flex; flex-direction: column; }
.flm-pick small { color: var(--flm-muted); }

/* Invoice items */
.flm-item-head, .flm-item-row { display: grid; grid-template-columns: minmax(200px, 1fr) 70px 70px 110px 90px 100px 34px; gap: 8px; align-items: start; }
.flm-item-head { font-size: 12px; font-weight: 600; color: var(--flm-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.flm-item-row textarea { margin-bottom: 4px; }
.flm-item-artwork { font-size: 12px !important; min-height: 30px !important; padding: 3px 6px !important; }
.flm-item-total { display: block; text-align: right; padding-top: 8px; font-variant-numeric: tabular-nums; }
.flm-totals { margin: 16px 0 0 auto; width: 280px; }
.flm-totals div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.flm-total-gross { border-top: 2px solid var(--flm-text); font-weight: 700; font-size: 16px; }
.flm-invoice-form.is-small .flm-vat-col { display: none; }
.flm-invoice-form.is-small .flm-item-head, .flm-invoice-form.is-small .flm-item-row { grid-template-columns: minmax(200px, 1fr) 70px 70px 110px 100px 34px; }
.flm-calc-preview { font-variant-numeric: tabular-nums; color: var(--flm-muted); min-height: 1.5em; }
/* Foreign currencies */
.flm-fx { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; align-items: start; }
.flm-fx .flm-fx-rate { display: none; }
.flm-fx.is-foreign .flm-fx-rate { display: block; }
.flm-fx-rate-input { display: flex; align-items: center; gap: 6px; }
.flm-fx-rate-input input { flex: 1; min-width: 0; }
.flm-fx-rate-input [data-fx-code] { color: var(--flm-muted); font-weight: 600; }
.flm-fx-preview { grid-column: 1 / -1; margin: 0 0 8px; color: var(--flm-muted); font-variant-numeric: tabular-nums; }
.flm-fx-preview:empty { display: none; }
aside .flm-fx { grid-template-columns: 1fr; }
.flm-fx-table td.num { white-space: nowrap; }
.flm-pay-form { border-bottom: 1px solid var(--flm-border); padding-bottom: 12px; margin-bottom: 4px; }

/* Template pickers */
.flm-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.flm-tpl-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 2px solid var(--flm-border); border-radius: 8px; cursor: pointer; background: #fff; }
.flm-tpl-card:has(input:checked) { border-color: var(--flm-accent); background: #f1f6fd; }
.flm-tpl-card input { position: absolute; opacity: 0; }
.flm-tpl-card:focus-within { outline: 2px solid var(--flm-accent); outline-offset: 2px; }
.flm-tpl-name { font-weight: 600; font-size: 13px; }
.flm-tpl-card small { color: var(--flm-muted); font-size: 11.5px; line-height: 1.35; }
.flm-tpl-thumb { position: relative; display: block; background: var(--bg, #fff); border: 1px solid #d9d8d3; border-radius: 3px; aspect-ratio: 210 / 297; overflow: hidden; width: 100%; }
.flm-tpl-thumb.flm-o-L { aspect-ratio: 297 / 210; }
.flm-tpl-thumb i { position: absolute; display: block; background: color-mix(in srgb, var(--fg) 30%, var(--bg)); }
.flm-tpl-thumb b { position: absolute; display: block; height: 4px; background: var(--fg); opacity: .7; }
.flm-l-single i { left: 18%; right: 18%; top: 14%; bottom: 28%; }
.flm-l-single b { left: 18%; width: 30%; bottom: 18%; }
.flm-l-split i { left: 8%; width: 58%; top: 12%; bottom: 12%; }
.flm-l-split b { right: 6%; width: 22%; bottom: 20%; }
.flm-l-split.has-side::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 32%; background: var(--side); }
.flm-l-split.has-side b { z-index: 1; background: #fff; opacity: .9; }
.flm-l-fullbleed i { left: 2%; right: 2%; top: 2%; bottom: 22%; }
.flm-l-fullbleed b { left: 0; right: 0; bottom: 0; height: 18%; background: #000; opacity: 1; border-top: 2px solid var(--ac); }
.flm-l-catalogue i { left: 10%; right: 10%; top: 8%; height: 46%; }
.flm-l-catalogue b { left: 10%; width: 50%; top: 60%; box-shadow: 0 8px 0 var(--fg), 0 16px 0 var(--fg), 0 24px 0 var(--fg); height: 3px; opacity: .45; }
.flm-o-L.flm-l-catalogue i { left: 6%; width: 50%; top: 10%; bottom: 10%; height: auto; }
.flm-o-L.flm-l-catalogue b { left: 62%; width: 28%; top: 20%; }
.flm-l-framed i { left: 24%; right: 24%; top: 18%; bottom: 34%; outline: 7px solid var(--mat); box-shadow: 0 0 0 8px rgba(0,0,0,.12); }
.flm-l-framed b { right: 14%; width: 26%; bottom: 14%; height: 8px; background: #fff; opacity: 1; }
.flm-l-framed.is-polaroid i { bottom: 40%; box-shadow: 0 0 0 7px var(--mat), 0 16px 0 7px var(--mat); outline: 0; }
.flm-l-framed.is-polaroid b { left: 26%; bottom: 25%; width: 30%; height: 3px; background: var(--fg); }
.flm-l-duo i:nth-child(1) { left: 8%; width: 38%; top: 20%; bottom: 30%; }
.flm-l-duo i:nth-child(2) { right: 8%; width: 38%; top: 20%; bottom: 30%; }
.flm-l-duo b { left: 8%; width: 20%; bottom: 20%; }
.flm-o-P.flm-l-duo i:nth-child(1) { left: 14%; right: 14%; width: auto; top: 8%; bottom: 56%; }
.flm-o-P.flm-l-duo i:nth-child(2) { left: 14%; right: 14%; width: auto; top: 50%; bottom: 14%; }
.flm-o-P.flm-l-duo b { bottom: 8%; left: 14%; background: var(--ac); }
.flm-l-grid4 i { width: 36%; height: 30%; }
.flm-l-grid4 i:nth-child(1) { left: 10%; top: 10%; } .flm-l-grid4 i:nth-child(2) { right: 10%; top: 10%; }
.flm-l-grid4 i:nth-child(3) { left: 10%; top: 52%; } .flm-l-grid4 i:nth-child(4) { right: 10%; top: 52%; }
.flm-l-grid4 b { display: none; }
.flm-l-grid9 i { width: 24%; height: 20%; }
.flm-l-grid9 i:nth-child(3n+1) { left: 9%; } .flm-l-grid9 i:nth-child(3n+2) { left: 38%; } .flm-l-grid9 i:nth-child(3n) { left: 67%; }
.flm-l-grid9 i:nth-child(-n+3) { top: 9%; } .flm-l-grid9 i:nth-child(n+4):nth-child(-n+6) { top: 38%; } .flm-l-grid9 i:nth-child(n+7) { top: 67%; }
.flm-l-grid9 b { display: none; }
.flm-tpl-covers .flm-tpl-thumb { --bg: #fff; --fg: #222; background: #fff; }
.flm-cover-1 i:nth-child(1) { left: 22%; right: 22%; top: 14%; height: 40%; background: #c9c7c0; }
.flm-cover-1 i:nth-child(2) { left: 22%; right: 22%; top: 62%; height: 7%; background: #222; }
.flm-cover-1 i:nth-child(3) { left: 34%; right: 34%; top: 74%; height: 3%; background: #999; }
.flm-cover-2 { background: #111 !important; }
.flm-cover-2 i:nth-child(1) { left: 0; right: 0; top: 0; bottom: 18%; background: #8a8780; }
.flm-cover-2 i:nth-child(2) { left: 0; right: 0; bottom: 0; height: 18%; background: #2a78d6; }
.flm-cover-2 i:nth-child(3) { left: 8%; width: 50%; bottom: 8%; height: 4%; background: #fff; }
.flm-cover-3 i:nth-child(1) { left: 0; top: 0; bottom: 0; width: 42%; background: #2a78d6; }
.flm-cover-3 i:nth-child(2) { right: 8%; width: 42%; top: 12%; bottom: 12%; background: #c9c7c0; }
.flm-cover-3 i:nth-child(3) { left: 6%; width: 28%; top: 54%; height: 6%; background: #fff; }
.flm-cover-4 i:nth-child(1) { left: 10%; top: 8%; width: 12%; height: 2%; background: #2a78d6; }
.flm-cover-4 i:nth-child(2) { left: 10%; right: 10%; top: 16%; height: 26%; background: #222; }
.flm-cover-4 i:nth-child(3) { right: 10%; bottom: 10%; width: 40%; height: 26%; background: #c9c7c0; }
.flm-cover-5 i:nth-child(1) { inset: 5%; background: transparent; border: 1px solid #222; }
.flm-cover-5 i:nth-child(2) { left: 18%; right: 18%; top: 14%; bottom: 30%; background: #c9c7c0; }
.flm-cover-5 i:nth-child(3) { left: 12%; width: 40%; bottom: 12%; height: 3%; background: #222; }

/* Chart */
.flm-chart-wrap { position: relative; }
.flm-chart { width: 100%; height: auto; display: block; }
.flm-chart .flm-grid-line { stroke: #ecebe7; stroke-width: 1; }
.flm-chart .flm-baseline { stroke: #b9b8b2; stroke-width: 1; }
.flm-chart .flm-axis { fill: #6b6a66; font-size: 11px; }
.flm-chart .flm-bar-income { fill: var(--flm-income); }
.flm-chart .flm-bar-expense { fill: var(--flm-expense); }
.flm-chart .flm-hit { fill: transparent; cursor: default; }
.flm-chart .flm-hit:hover { fill: rgba(0,0,0,.04); }
.flm-legend-chart { display: flex; gap: 16px; margin-bottom: 8px; font-size: 13px; color: #3b3a37; }
.flm-legend-chart span { display: inline-flex; gap: 6px; align-items: center; }
.flm-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.flm-key-income { background: var(--flm-income); }
.flm-key-expense { background: var(--flm-expense); }
.flm-chart-tip { position: absolute; pointer-events: none; background: #1d1d1b; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; max-width: 280px; z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.flm-share-table td:first-child { position: relative; }
.flm-share { display: block; height: 4px; border-radius: 2px; margin-top: 4px; }
.flm-share-income { background: var(--flm-income); }
.flm-share-expense { background: var(--flm-expense); }
.flm-euer th, .flm-euer td { padding: 6px 10px; }
.flm-euer-head th { background: #f6f6f4; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; color: var(--flm-muted); }
.flm-euer-sum th, .flm-euer-sum td { font-weight: 700; border-bottom: 2px solid var(--flm-border); }
.flm-euer-result th, .flm-euer-result td { font-size: 17px; font-weight: 750; background: #f0f8f3; }
.flm-euer-result.is-negative th, .flm-euer-result.is-negative td { background: #fdf2f2; color: var(--flm-red); }

/* Newsletter */
.flm-suggestions { list-style: none; margin: 0; padding: 0; }
.flm-suggestions li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #f0efeb; }
.flm-suggestions small { text-transform: uppercase; font-size: 11px; letter-spacing: .04em; color: var(--flm-muted); }
.flm-suggestions .flm-btn { align-self: flex-start; margin-top: 4px; }
.flm-nl-progress progress { width: 100%; height: 12px; }
.flm-nl-preview { border: 1px solid var(--flm-border); padding: 16px; border-radius: 6px; max-height: 600px; overflow: auto; }
.flm-nl-preview img { max-width: 100%; height: auto; }

/* Misc */
.flm-copy { cursor: copy; background: #f3f3f1; padding: 3px 8px; border-radius: 4px; word-break: break-all; display: inline-block; }
.flm-copy.is-copied { background: #e6f4ea; }
.flm-code-big { display: block; font-size: 14px; padding: 12px; }
.flm-preview { overflow: hidden; }
.flm-cv-quick { display: flex; gap: 8px; align-items: center; }
.flm-cv-quick select { width: auto; }
.flm-login { display: flex; align-items: center; justify-content: center; grid-template-columns: 1fr; }
.flm-login-box { background: #fff; padding: 32px; border-radius: 10px; border: 1px solid var(--flm-border); width: 100%; max-width: 380px; margin: 40px 16px; }
.flm-login-box input[type=text], .flm-login-box input[type=password] { margin-bottom: 8px; }
.flm-login-box .button { padding: 8px 16px; background: var(--flm-primary); color: #fff; border: 0; border-radius: 6px; cursor: pointer; }
.flm-asset-box { background: #f6f6f4; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }

/* Responsive */
@media (max-width: 1100px) {
	.flm-layout-main-side { grid-template-columns: minmax(0, 1fr); }
	.flm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.flm-app { grid-template-columns: minmax(0, 1fr); }
	.flm-layout-main-side { grid-template-columns: minmax(0, 1fr); }
	.flm-nav { display: none; position: static; min-height: 0; max-height: none; }
	.flm-nav.is-open { display: block; }
	.flm-nav-toggle { display: flex; gap: 6px; align-items: center; padding: 10px 16px; background: #1d1d1b; color: #fff; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
	.flm-main { padding: 16px; }
	.flm-cols, .flm-grid-2, .flm-grid-3, .flm-grid-4 { grid-template-columns: minmax(0, 1fr); }
	.flm-event-row { grid-template-columns: 1fr 1fr; }
	.flm-item-head { display: none; }
	.flm-item-row, .flm-invoice-form.is-small .flm-item-row { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--flm-border); padding-bottom: 8px; }
	.flm-item-row > div:first-child { grid-column: 1 / -1; }
	.flm-context-admin { margin-left: 0; }
}

/* Print (reports, EÜR) */
@media print {
	.flm-nav, .flm-nav-toggle, .flm-head .flm-actions, .flm-no-print, .flm-tabs, .flm-filterbar, #wpadminbar, #adminmenumain, #wpfooter { display: none !important; }
	.flm-app { display: block; background: #fff; }
	.flm-main { padding: 0; }
	.flm-card { border: 0; padding: 0; }
	#wpcontent { margin: 0 !important; }
}
.flm-item-row .flm-remove-row { align-self: start; margin-top: 4px; }

/* ---- 1.1: fixed costs, cash flow, projects, travel ---- */
.flm-grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 12px; }
.flm-badge-private { background: #efeafc; color: #4a3aa8; }
.flm-badge-planned, .flm-badge-inactive { background: #ecebe7; color: #55544f; }
.flm-badge-active, .flm-badge-booked { background: #e6f4ea; color: #146c3a; }
.flm-badge-closed { background: #ecebe7; color: #44433f; }
.flm-row-group th { background: #f6f6f4; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--flm-muted); }
.flm-table tr.is-inactive td { opacity: .55; }
.flm-table tr.is-overdue td:first-child { color: #9b1c22; font-weight: 600; }
.flm-dropdown { position: relative; display: inline-block; }
.flm-dropdown summary { list-style: none; cursor: pointer; }
.flm-dropdown summary::-webkit-details-marker { display: none; }
.flm-dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: #fff; border: 1px solid var(--flm-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 260px; padding: 6px; display: grid; }
.flm-dropdown-menu a { padding: 7px 10px; border-radius: 6px; color: var(--flm-text); text-decoration: none; }
.flm-dropdown-menu a:hover, .flm-dropdown-menu a:focus { background: #f2f2ef; }
.flm-details summary { cursor: pointer; margin: 10px 0; color: var(--flm-accent); }

/* Cost frame bars: status by icon + label, never by colour alone. */
.flm-frame { display: grid; gap: 3px; min-width: 150px; }
.flm-frame-track { position: relative; height: 8px; background: #ecebe7; border-radius: 4px; overflow: visible; }
.flm-frame-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--flm-income); border-radius: 4px; }
.flm-frame-limit { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #1d1d1b; border-radius: 1px; }
.flm-frame-warn .flm-frame-fill { background: #fab219; }
.flm-frame-over .flm-frame-fill { background: #d03b3b; }
.flm-frame-label { font-size: 11.5px; color: var(--flm-muted); }
.flm-frame-over .flm-frame-label { color: #9b1c22; font-weight: 600; }
.flm-frame-warn .flm-frame-label { color: #7a5600; font-weight: 600; }
.flm-kpi .flm-frame { margin-top: 6px; }

/* Charts: forecast hatching, line chart, extra legend keys. */
.flm-hatch-bg { fill: #ffffff; }
.flm-hatch-income .flm-hatch-line { stroke: var(--flm-income); stroke-width: 2.5; }
.flm-hatch-expense .flm-hatch-line { stroke: var(--flm-expense); stroke-width: 2.5; }
.flm-hatch-neutral .flm-hatch-line { stroke: #6b6a66; stroke-width: 2.5; }
.flm-bar-forecast { stroke-width: 1; }
.flm-bar-forecast-income { stroke: var(--flm-income); }
.flm-bar-forecast-expense { stroke: var(--flm-expense); }
.flm-key-forecast { background: repeating-linear-gradient(45deg, #6b6a66 0 2px, #fff 2px 5px); border: 1px solid #6b6a66; }
.flm-chart .flm-line { fill: none; stroke: #1f2937; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.flm-chart .flm-line-forecast { stroke-dasharray: 5 4; }
.flm-chart .flm-dot { fill: #1f2937; stroke: #fff; stroke-width: 2; }
.flm-chart .flm-dot.is-forecast { fill: #fff; stroke: #1f2937; }
.flm-chart .flm-dot.is-negative { fill: #d03b3b; }
.flm-chart .flm-bar-neutral { fill: #6b6a66; }
.flm-key-neutral { background: #6b6a66; }

/* Cash flow table */
.flm-cashflow td, .flm-cashflow th { white-space: nowrap; font-size: 12.5px; }
.flm-cashflow .is-forecast { color: var(--flm-muted); font-style: italic; }
.flm-cashflow tfoot th, .flm-cashflow tfoot td { border-top: 2px solid var(--flm-border); }
.flm-row-sub th, .flm-row-sub td { font-weight: 400; color: var(--flm-muted); }

/* Project calculation lines */
.flm-calc-head, .flm-calc-row { display: grid; grid-template-columns: 90px minmax(140px, 1fr) minmax(160px, 1.4fr) 64px 64px 100px 100px 100px 34px; gap: 6px; align-items: center; }
.flm-calc-head { font-size: 12px; color: var(--flm-muted); margin-bottom: 4px; }
.flm-calc-row output { text-align: right; font-variant-numeric: tabular-nums; }
.flm-calc-row.is-income { background: #f3f8fe; border-radius: 6px; }
.flm-calc-params { margin-top: 16px; }
.flm-kpi-over strong { color: #9b1c22; }

/* Travel */
.flm-meals td, .flm-meals th { text-align: center; }
.flm-meals td:first-child, .flm-meals th:first-child, .flm-meals td:nth-child(6) { text-align: left; }

/* User manual */
.flm-manual { max-width: 860px; line-height: 1.65; }
.flm-manual h2 { margin-top: 2em; padding-top: .6em; border-top: 1px solid var(--flm-border); }
.flm-manual h3 { margin-top: 1.4em; }
.flm-manual code { background: #f2f2ef; padding: 1px 5px; border-radius: 4px; }
.flm-manual-toc { columns: 2; column-gap: 32px; }
.flm-manual-toc li { break-inside: avoid; }
.flm-manual .flm-tip { background: #f3f8fe; border-left: 3px solid var(--flm-income); padding: 8px 12px; border-radius: 0 6px 6px 0; }

@media (max-width: 960px) {
	.flm-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.flm-calc-head { display: none; }
	.flm-calc-row { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--flm-border); padding-bottom: 8px; margin-bottom: 8px; }
	.flm-calc-row input[name="items[description][]"] { grid-column: 1 / -1; }
	.flm-manual-toc { columns: 1; }
}
@media (max-width: 600px) {
	.flm-grid-5 { grid-template-columns: minmax(0, 1fr); }
}
@media print {
	.flm-frame-track { border: 1px solid #999; }
}

/* Export with language choice, app language switch */
.flm-export { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.flm-export select { max-width: 9.5em; padding: 6px 4px; font-size: 13px; }
.flm-lang-form { display: flex; align-items: center; gap: 6px; padding: 8px 12px; margin: 0; }
.flm-lang-form select { flex: 1; min-width: 0; background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 4px 6px; font-size: 13px; }
.flm-lang-form select option { color: #1d1d1b; }
.flm-lang-form .dashicons { opacity: .75; }

/* Website pages from shortcodes */
.flm-site-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 12px 0; }
.flm-site-page { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid #dcdcde; border-radius: 8px; cursor: pointer; background: #fff; }
.flm-site-page:hover { border-color: #2a78d6; }
.flm-site-page input { margin-top: 3px; }
.flm-site-page strong { display: block; }
.flm-site-page small { display: block; color: #646970; margin-top: 2px; }
.flm-site-page.is-done { background: #f6f7f7; cursor: default; }
.flm-site-page.is-done:hover { border-color: #dcdcde; }
.flm-site-page-done { color: #1e7e34 !important; }
.flm-site-page-done .dashicons { font-size: 16px; width: 16px; height: 16px; vertical-align: -3px; }
.flm-site-pages-actions { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.flm-site-pages-actions .flm-field { margin: 0; min-width: 220px; }

/* License */
.flm-license-notice .dashicons { vertical-align: -4px; }
.flm-license-mode { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.flm-license-mode .dashicons { font-size: 24px; width: 24px; height: 24px; }
.flm-license-licensed .dashicons, .flm-license-trial .dashicons { color: var(--flm-green); }
.flm-license-grace .dashicons { color: #b8860b; }
.flm-license-expired .dashicons, .flm-license-none .dashicons { color: var(--flm-red); }
.flm-license-features { list-style: none; margin: 0; padding: 0; }
.flm-license-features li { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #eee; }
.flm-license-features li em { margin-left: auto; font-style: normal; font-size: 12px; color: #646970; white-space: nowrap; }
.flm-license-features .is-on .dashicons { color: var(--flm-green); }
.flm-license-features .is-off .dashicons { color: var(--flm-red); }
.flm-help-list { margin: 0; padding-left: 18px; color: #50575e; }
.flm-help-list li { margin-bottom: 6px; }
form.flm-locked { position: relative; }
form.flm-locked button[type="submit"], form.flm-locked .flm-btn-primary { opacity: .45; cursor: not-allowed; }
form.flm-locked :disabled { cursor: not-allowed; }
.flm-site-pages-options { margin: 6px 0 14px; display: grid; gap: 4px; }

/* Backup */
.flm-badge-ok { background: #e6f4ea; color: #146c3a; }
.flm-badge-error { background: #fbe9ea; color: #9b1c22; }
.flm-backup-dest { border: 1px solid var(--flm-border, #e3e1dc); border-radius: 8px; padding: 0 14px; margin: 0 0 10px; }
.flm-backup-dest[open] { padding-bottom: 12px; }
.flm-backup-dest > summary { cursor: pointer; padding: 11px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.flm-backup-dest > summary::-webkit-details-marker { display: none; }
.flm-backup-dest > summary em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--flm-muted); }
.flm-backup-dest > summary .dashicons-yes-alt { color: #146c3a; }
.flm-backup-dest .flm-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flm-backup-details { font-size: 12.5px; color: var(--flm-muted); }
.flm-nowrap { white-space: nowrap; }

/* Year-end closing */
.flm-progress { height: 8px; background: #ecebe7; border-radius: 99px; overflow: hidden; margin: 4px 0 6px; }
.flm-progress span { display: block; height: 100%; background: #146c3a; border-radius: 99px; }
.flm-yearend { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.flm-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.flm-steps li a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--flm-text); text-decoration: none; }
.flm-steps li a:hover { background: #f3f2ef; }
.flm-steps li.is-current a { background: #fff; box-shadow: 0 0 0 1px var(--flm-border); font-weight: 600; }
.flm-steps .dashicons { flex: 0 0 20px; }
.flm-steps .is-done .dashicons, .flm-checks .is-ok > .dashicons, .flm-step-done .dashicons { color: #146c3a; }
.flm-steps .is-ok .dashicons { color: #6b6a66; }
.flm-steps .is-warn .dashicons, .flm-checks .is-warn > .dashicons { color: #b26a00; }
.flm-steps .is-todo .dashicons, .flm-checks .is-todo > .dashicons { color: #b3261e; }
.flm-checks .is-info > .dashicons { color: #2a78d6; }
.flm-step .flm-kicker { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--flm-muted); }
.flm-step-state.is-done, .flm-step-state.is-ok { color: #146c3a; }
.flm-step-state.is-warn { color: #b26a00; }
.flm-step-state.is-todo { color: #b3261e; }
.flm-checks { list-style: none; margin: 16px 0; padding: 0; }
.flm-checks > li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--flm-border); }
.flm-checks > li > div { min-width: 0; }
.flm-checks p { margin: 0; }
.flm-checks ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.flm-step-done { border-top: 1px solid var(--flm-border); padding-top: 12px; margin-top: 8px; }
.flm-step-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.flm-step-nav .flm-btn-primary { margin-left: auto; }
.flm-export-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.flm-yearend-form { margin-top: 10px; }
@media (max-width: 900px) { .flm-yearend { grid-template-columns: minmax(0, 1fr); } }
/* Currency changeover */
.flm-changeover { border-left: 4px solid #2563eb; }
.flm-changeover h2 { margin-top: 0; }
.flm-changeover-list { margin: 0 0 1em; padding-left: 1.2em; }
.flm-changeover-mode { border: 0; padding: 0; margin: 0 0 1em; }
.flm-changeover-mode legend { font-weight: 600; margin-bottom: .4em; }
.flm-changeover-mode label { display: block; margin: .4em 0; }
.flm-changeover-mode input.flm-changeover-rate { display: inline-block; width: 9em; max-width: 9em; margin: 0 .3em; }

/* Trips: own daily rates */
.flm-meals input.flm-day-rate-input { display: none; width: 6.5em; max-width: 6.5em; padding: 4px 6px; text-align: right; }
.flm-meals.is-custom input.flm-day-rate-input { display: inline-block; }
.flm-meals.is-custom .flm-day-rate-text { display: none; }
.flm-day-rate-official { display: block; }
