/*
Theme Name: Embroidery Studio
Theme URI: https://embroideryflow.com
Author: Embroidery Flow
Description: Tema premium para a plataforma Embroidery Flow — editor Fabric.js v2 com arquitetura modular, layers, snap, zoom, importação SVG e pipeline de bordado.
Version: 2.7.0
Requires at least: 6.2
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: embroidery-studio
*/

/* =========================================================================
   TOKENS
   ========================================================================= */
:root {
	--efs-ink         : #1f2933;
	--efs-muted       : #68737d;
	--efs-paper       : #f5f2ed;
	--efs-card        : #fffdf9;
	--efs-line        : #ded8cf;
	--efs-coral       : #d9644f;
	--efs-coral-dark  : #a94439;
	--efs-teal        : #1f7775;
	--efs-gold        : #c9994f;
	--efs-shadow      : 0 20px 60px rgba(52,42,32,.09);

	/* Studio dark palette */
	--st-bg           : #202c31;
	--st-shell        : #172126;
	--st-toolbar      : #23343a;
	--st-panel        : #1c2a2f;
	--st-border       : #3c4b50;
	--st-text         : #e9f1ef;
	--st-muted        : #a8bfbc;
	--st-item-hover   : #2b454a;
	--st-accent       : #347d7a;
	--st-accent-light : #59aaa2;
	--st-btn-bg       : #2b4046;
	--st-btn-border   : #4b5e63;
	--st-canvas-bg    : #26383d;
}

/* =========================================================================
   RESET / BASE
   ========================================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	color: var(--efs-ink);
	background: var(--efs-paper);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.6;
}
a { color: var(--efs-teal); text-decoration: none; }
a:hover { color: var(--efs-coral-dark); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, .efs-button { cursor: pointer; }
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal;
}

/* =========================================================================
   LAYOUT
   ========================================================================= */
.efs-container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.efs-narrow    { width: min(760px,  calc(100% - 40px)); margin: 0 auto; }

/* =========================================================================
   SITE HEADER
   ========================================================================= */
.efs-site-header {
	position: sticky; top: 0; z-index: 30;
	background: rgba(245,242,237,.92);
	backdrop-filter: blur(18px);
	border-bottom: 1px solid rgba(222,216,207,.8);
}
.efs-header-inner {
	min-height: 76px; display: flex; align-items: center;
	gap: 30px; justify-content: space-between;
}
.efs-brand {
	display: inline-flex; align-items: center; gap: 11px;
	color: var(--efs-ink); font-weight: 800; letter-spacing: -.04em; font-size: 1.12rem;
}
.efs-brand-mark {
	width: 34px; height: 34px; display: grid; place-items: center;
	border-radius: 11px 4px 11px 4px; color: #fff;
	background: var(--efs-coral); font-size: .9rem;
	box-shadow: 4px 4px 0 var(--efs-gold);
}
.efs-main-nav { display: flex; align-items: center; gap: 24px; font-size: .92rem; }
.efs-main-nav a { color: var(--efs-ink); }
.efs-main-nav a:hover { color: var(--efs-coral-dark); }
.efs-header-actions { display: flex; align-items: center; gap: 12px; }
.efs-menu-toggle { display: none; border: 0; background: transparent; color: var(--efs-ink); font-size: 1.5rem; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.efs-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px;
	background: var(--efs-coral); color: #fff; font-weight: 700;
	transition: transform .2s, background .2s, box-shadow .2s;
}
.efs-button:hover { color: #fff; background: var(--efs-coral-dark); transform: translateY(-2px); box-shadow: 0 9px 20px rgba(169,68,57,.18); }
.efs-button-secondary { color: var(--efs-ink); background: transparent; border-color: var(--efs-line); }
.efs-button-secondary:hover { color: var(--efs-ink); background: #fff; border-color: var(--efs-ink); }
.efs-button-small   { min-height: 38px; padding: 0 14px; font-size: .86rem; }
.efs-button-quiet   { min-height: 38px; color: var(--efs-muted); background: transparent; padding: 0 10px; }
.efs-button-quiet:hover { color: var(--efs-coral-dark); background: transparent; box-shadow: none; }

/* =========================================================================
   HERO
   ========================================================================= */
.efs-hero { padding: 110px 0 100px; overflow: hidden; }
.efs-hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 70px; align-items: center; }
.efs-kicker { color: var(--efs-coral-dark); text-transform: uppercase; letter-spacing: .17em; font-size: .74rem; font-weight: 800; }
.efs-hero h1 { max-width: 720px; margin: 16px 0 22px; font-family: Georgia, serif; font-size: clamp(3.2rem,7vw,6.7rem); line-height: .95; letter-spacing: -.075em; font-weight: 500; }
.efs-hero h1 em { color: var(--efs-teal); font-style: normal; }
.efs-lede { max-width: 580px; color: var(--efs-muted); font-size: 1.15rem; }
.efs-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.efs-hero-art { position: relative; min-height: 440px; }
.efs-art-card { position: absolute; border: 1px solid rgba(255,255,255,.8); box-shadow: var(--efs-shadow); }
.efs-art-card-main { inset: 42px 12px 0 42px; padding: 28px; background: #214f52; border-radius: 44px 12px 44px 12px; transform: rotate(3deg); }
.efs-art-card-main:before { content: ""; position: absolute; inset: 42px; border: 1px dashed rgba(255,255,255,.38); border-radius: 50%; }
.efs-art-card-main:after { content: "✦"; position: absolute; left: 50%; top: 50%; color: #f6c98a; font-size: 4rem; transform: translate(-50%,-50%); }
.efs-art-card-small { right: 0; bottom: 22px; padding: 20px; width: 180px; background: #fffdf9; border-radius: 16px 40px 16px 40px; transform: rotate(-8deg); }
.efs-art-thread { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; font-size: .8rem; color: var(--efs-muted); }
.efs-thread-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--efs-coral); }
.efs-thread-dot-teal { background: var(--efs-teal); }
.efs-thread-dot-gold { background: var(--efs-gold); }

/* =========================================================================
   SECTIONS / CARDS
   ========================================================================= */
.efs-section { padding: 86px 0; }
.efs-section-light { background: #fffdf9; }
.efs-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 34px; }
.efs-section-heading h2, .efs-page-heading h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.2rem,4vw,4rem); line-height: 1; font-weight: 500; letter-spacing: -.055em; }
.efs-section-heading p { max-width: 430px; margin: 0; color: var(--efs-muted); }
.efs-eyebrow { margin: 0 0 10px; color: var(--efs-coral-dark); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; }
.efs-card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.efs-card { padding: 26px; background: var(--efs-card); border: 1px solid var(--efs-line); border-radius: 20px; box-shadow: 0 8px 26px rgba(52,42,32,.035); }
.efs-card h3 { margin: 0 0 9px; font-size: 1.15rem; letter-spacing: -.02em; }
.efs-card p  { margin: 0 0 20px; color: var(--efs-muted); }
.efs-tool-card { display: flex; flex-direction: column; min-height: 260px; }
.efs-tool-mark { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 14px; color: #fff; background: var(--efs-teal); font-weight: 800; }
.efs-tool-card:nth-child(2) .efs-tool-mark { background: var(--efs-coral); }
.efs-tool-card:nth-child(3) .efs-tool-mark { background: var(--efs-gold); }
.efs-tool-card .efs-button { margin-top: auto; align-self: flex-start; }
.efs-stat-strip { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--efs-line); border-bottom: 1px solid var(--efs-line); }
.efs-stat { padding: 24px 0; }
.efs-stat strong { display: block; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.efs-stat span { color: var(--efs-muted); font-size: .9rem; }
.efs-page { padding: 70px 0 100px; min-height: 70vh; }
.efs-page-heading { margin-bottom: 40px; }
.efs-page-heading p { max-width: 640px; color: var(--efs-muted); font-size: 1.05rem; }
.efs-breadcrumb { margin-bottom: 25px; color: var(--efs-muted); font-size: .84rem; }

/* =========================================================================
   AUTH / FORMS
   ========================================================================= */
.efs-auth-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; align-items: start; max-width: 940px; }
.efs-auth-aside { padding-top: 25px; }
.efs-auth-aside h1 { margin: 0 0 18px; font-family: Georgia, serif; font-size: 3.5rem; line-height: .98; letter-spacing: -.06em; font-weight: 500; }
.efs-auth-aside p { color: var(--efs-muted); }
.efs-form-card { padding: 34px; background: var(--efs-card); border: 1px solid var(--efs-line); border-radius: 22px; box-shadow: var(--efs-shadow); }
.efs-auth-gate { max-width: 680px; margin: 0 auto; }
.efs-auth-gate .efs-button { margin: 8px 8px 0 0; }
.efs-subscription-gate { border-top: 4px solid var(--efs-coral); }
.efs-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.efs-field { margin-bottom: 18px; }
.efs-field label { display: block; margin-bottom: 7px; font-size: .86rem; font-weight: 700; }
.efs-field input, .efs-field select, .efs-field textarea {
	width: 100%; min-height: 48px; padding: 12px 14px;
	border: 1px solid var(--efs-line); border-radius: 10px;
	color: var(--efs-ink); background: #fff;
}
.efs-field textarea { min-height: 130px; resize: vertical; }
.efs-field input:focus, .efs-field select:focus, .efs-field textarea:focus {
	outline: 2px solid rgba(31,119,117,.2); border-color: var(--efs-teal);
}
.efs-form-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 20px; color: var(--efs-muted); font-size: .86rem; }
.efs-form-meta label { display: flex; align-items: center; gap: 7px; }
.efs-form-footer { margin-top: 22px; color: var(--efs-muted); font-size: .88rem; }
.efs-notice { padding: 14px 16px; margin-bottom: 18px; border-radius: 10px; background: #edf7f5; color: #216c68; border: 1px solid #b8dfd8; }
.efs-notice-error { background: #fff0ec; color: #9d3e32; border-color: #efc4ba; }
.efs-notice ul { margin: 0; padding-left: 20px; }

/* =========================================================================
   DASHBOARD
   ========================================================================= */
.efs-dashboard-shell { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
.efs-sidebar { position: sticky; top: 100px; padding: 18px; background: #244f51; border-radius: 18px; }
.efs-sidebar-label { margin: 4px 10px 12px; color: #a9ceca; text-transform: uppercase; letter-spacing: .13em; font-size: .67rem; font-weight: 800; }
.efs-sidebar a { display: block; padding: 10px; border-radius: 8px; color: #eef9f6; font-size: .9rem; }
.efs-sidebar a:hover, .efs-sidebar a.is-active { color: #fff; background: rgba(255,255,255,.12); }
.efs-dashboard-main { min-width: 0; }
.efs-dashboard-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.efs-dashboard-header h1 { margin: 0; font-family: Georgia, serif; font-weight: 500; font-size: clamp(2.2rem,4vw,3.7rem); line-height: 1; letter-spacing: -.055em; }
.efs-dashboard-header p { margin: 9px 0 0; color: var(--efs-muted); }
.efs-credit-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-bottom: 18px; }
.efs-credit-card { padding: 24px; background: var(--efs-card); border: 1px solid var(--efs-line); border-radius: 16px; }
.efs-credit-card span, .efs-credit-card small { color: var(--efs-muted); }
.efs-credit-card strong { display: block; margin: 8px 0 2px; font-family: Georgia, serif; font-size: 2.7rem; line-height: 1; font-weight: 500; }
.efs-activity { overflow: hidden; margin-top: 22px; border: 1px solid var(--efs-line); border-radius: 16px; background: var(--efs-card); }
.efs-activity h2 { margin: 0; padding: 20px 22px; border-bottom: 1px solid var(--efs-line); font-size: 1rem; }
.efs-table-wrap { overflow-x: auto; }
.efs-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.efs-table th, .efs-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid #eee9e1; }
.efs-table th { color: var(--efs-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.efs-table tr:last-child td { border-bottom: 0; }
.efs-empty { padding: 28px 20px; color: var(--efs-muted); }

/* =========================================================================
   PRICING
   ========================================================================= */
.efs-pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; align-items: stretch; }
.efs-price-card { position: relative; display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--efs-line); border-radius: 20px; background: var(--efs-card); }
.efs-price-card.is-featured { color: #fff; background: #244f51; border-color: #244f51; transform: translateY(-10px); }
.efs-price-card.is-featured p, .efs-price-card.is-featured li, .efs-price-card.is-featured .efs-price-meta { color: #cae0dc; }
.efs-price-card h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.efs-price { margin: 14px 0 8px; font-family: Georgia, serif; font-size: 3rem; line-height: 1; }
.efs-price-meta { color: var(--efs-muted); font-size: .85rem; }
.efs-price-card ul { margin: 24px 0; padding-left: 18px; color: var(--efs-muted); }
.efs-price-card li { margin: 9px 0; }
.efs-price-card .efs-button { margin-top: auto; }
.efs-ribbon { position: absolute; top: 18px; right: 18px; padding: 5px 9px; border-radius: 99px; color: #fff; background: var(--efs-coral); font-size: .67rem; font-weight: 800; text-transform: uppercase; }

/* =========================================================================
   CTA / FOOTER
   ========================================================================= */
.efs-cta { padding: 72px 0; color: #fff; background: var(--efs-coral); }
.efs-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.efs-cta h2 { max-width: 600px; margin: 0; font-family: Georgia, serif; font-size: clamp(2.2rem,4vw,4rem); line-height: .98; font-weight: 500; letter-spacing: -.05em; }
.efs-cta .efs-button { background: #fff; color: var(--efs-coral-dark); }
.efs-site-footer { padding: 54px 0 25px; color: #d9e7e5; background: #183e40; }
.efs-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 42px; }
.efs-site-footer .efs-brand { color: #fff; }
.efs-footer-title { margin: 0 0 12px; color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; }
.efs-site-footer a { color: #c7deda; font-size: .9rem; }
.efs-site-footer p { color: #a9c6c2; font-size: .88rem; }
.efs-footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); color: #a9c6c2; font-size: .8rem; }
.efs-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* =========================================================================
   STUDIO v2 — full-screen editor
   ========================================================================= */
.efs-studio-body .efs-main { display: flex; flex-direction: column; height: calc(100vh - 76px); overflow: hidden; }

.efs-studio-page {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 14px;
	background: var(--st-bg);
	min-height: calc(100vh - 76px);
}

.efs-studio-shell {
	flex: 1;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--st-border);
	border-radius: 14px;
	overflow: hidden;
	background: var(--st-shell);
	color: var(--st-text);
	box-shadow: 0 22px 70px rgba(0,0,0,.28);
}

/* ---- Titlebar ---- */
.efs-studio-titlebar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 9px 14px;
	background: #1a2d33;
	border-bottom: 1px solid var(--st-border);
	font-size: .82rem;
}
.efs-studio-title {
	font-weight: 700;
	color: var(--st-text);
	flex: 1;
}
.efs-studio-status {
	color: var(--st-muted);
	font-size: .77rem;
	flex: 1;
	text-align: center;
}
.efs-studio-autosave {
	color: var(--st-muted);
	font-size: .72rem;
	flex-shrink: 0;
	min-width: 70px;
	text-align: right;
}
.efs-studio-autosave:not(:empty)::before { content: '● '; color: #7be0a0; font-size: .6rem; }
.efs-studio-titlebar-actions { display: flex; gap: 6px; }
.efs-stbtn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 10px; border: 1px solid var(--st-btn-border); border-radius: 6px;
	background: var(--st-btn-bg); color: var(--st-text); font-size: .75rem;
}
.efs-stbtn svg { width: 14px; height: 14px; flex-shrink: 0; }
.efs-stbtn:hover { background: var(--st-accent); border-color: var(--st-accent-light); }
.efs-stbtn.is-active { background: var(--st-accent); border-color: var(--st-accent-light); color: #fff; }

/* ---- Toolbar ---- */
.efs-studio-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 3px;
	padding: 7px 10px;
	background: var(--st-toolbar);
	border-bottom: 1px solid var(--st-border);
}
.efs-tb-group  { display: flex; align-items: center; gap: 2px; }
.efs-tb-sep    { width: 1px; height: 22px; background: var(--st-border); margin: 0 5px; }
.efs-tb-zoom   { gap: 5px; }

/* ---- Toolbar buttons ---- */
.efs-tbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-width: 30px;
	height: 30px;
	padding: 0 7px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: #c0d8d4;
	font-size: .74rem;
	transition: background .15s, border-color .15s, color .15s;
}
.efs-tbtn svg { width: 15px; height: 15px; flex-shrink: 0; }
.efs-tbtn:hover { background: var(--st-item-hover); border-color: var(--st-btn-border); color: var(--st-text); }
.efs-tbtn.is-active { background: var(--st-accent); border-color: var(--st-accent-light); color: #fff; }
.efs-tbtn:disabled { opacity: .35; pointer-events: none; }
.efs-tbtn-wide { min-width: auto; padding: 0 12px; font-weight: 700; border-color: var(--st-btn-border); background: var(--st-btn-bg); }
.efs-tbtn-wide:hover { background: var(--st-accent); border-color: var(--st-accent-light); color: #fff; }
.efs-tbtn-danger:hover { background: rgba(217,100,79,.25); border-color: var(--efs-coral); color: var(--efs-coral); }
.efs-zoom-val { font-size: .73rem; color: var(--st-muted); min-width: 38px; text-align: center; }

/* ---- Main layout ---- */
.efs-studio-layout {
	display: grid;
	grid-template-columns: 200px 1fr 240px;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

/* ---- Panels ---- */
.efs-studio-panel {
	padding: 14px 12px;
	background: var(--st-panel);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.efs-studio-panel + .efs-studio-panel { border-left: 1px solid var(--st-border); }
.efs-panel-layers { border-right: 1px solid var(--st-border); }
.efs-studio-panel > h2 {
	margin: 0 0 12px;
	color: #b4cfca;
	font-size: .67rem;
	letter-spacing: .15em;
	text-transform: uppercase;
}

/* ---- Tabbed panels (radio-driven, no JS required) ---- */
.efs-panel-tabs {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}
.efs-panel-tabs > input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.efs-panel-tabs-nav {
	display: flex;
	gap: 2px;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--st-border);
	flex-shrink: 0;
}
.efs-panel-tabs-nav label {
	flex: 1;
	padding: 6px 8px;
	border-radius: 6px;
	text-align: center;
	font-size: .67rem;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--st-muted);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
	user-select: none;
}
.efs-panel-tabs-nav label:hover { background: var(--st-item-hover); color: var(--st-text); }
.efs-panel-tab-content { display: none; flex-direction: column; flex: 1; min-height: 0; }
.efs-panel-tab-content[data-studio-panel] { overflow-y: auto; }

/* Left panel tabs: layers / tree / library */
#efs-left-tab-layers:checked  ~ .efs-panel-tabs-nav label[for="efs-left-tab-layers"],
#efs-left-tab-tree:checked    ~ .efs-panel-tabs-nav label[for="efs-left-tab-tree"],
#efs-left-tab-library:checked ~ .efs-panel-tabs-nav label[for="efs-left-tab-library"] {
	background: var(--st-accent); color: #fff;
}
#efs-left-tab-layers:checked  ~ .efs-panel-tabs-nav ~ .efs-tab-layers,
#efs-left-tab-tree:checked    ~ .efs-panel-tabs-nav ~ .efs-tab-tree,
#efs-left-tab-library:checked ~ .efs-panel-tabs-nav ~ .efs-tab-library {
	display: flex;
}

/* Right panel tabs: props / embroidery / sequence / preview */
#efs-right-tab-props:checked      ~ .efs-panel-tabs-nav label[for="efs-right-tab-props"],
#efs-right-tab-embroidery:checked ~ .efs-panel-tabs-nav label[for="efs-right-tab-embroidery"],
#efs-right-tab-sequence:checked   ~ .efs-panel-tabs-nav label[for="efs-right-tab-sequence"],
#efs-right-tab-preview:checked    ~ .efs-panel-tabs-nav label[for="efs-right-tab-preview"] {
	background: var(--st-accent); color: #fff;
}
#efs-right-tab-props:checked      ~ .efs-panel-tabs-nav ~ .efs-tab-props,
#efs-right-tab-embroidery:checked ~ .efs-panel-tabs-nav ~ .efs-tab-embroidery,
#efs-right-tab-sequence:checked   ~ .efs-panel-tabs-nav ~ .efs-tab-sequence,
#efs-right-tab-preview:checked    ~ .efs-panel-tabs-nav ~ .efs-tab-preview {
	display: flex;
}

/* ---- Object tree (ObjectTree.js) ---- */
.efs-object-tree { display: flex; flex-direction: column; flex: 1; overflow-y: auto; }
.efs-tree-root { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.efs-tree-layer { display: flex; flex-direction: column; }
.efs-tree-layer-row {
	display: flex; align-items: center; gap: 6px;
	padding: 6px 6px; border-radius: 6px; cursor: default;
	font-size: .76rem; color: var(--st-text);
}
.efs-tree-layer-row:hover { background: var(--st-item-hover); }
.efs-tree-caret {
	flex-shrink: 0; width: 12px; font-size: .6rem; color: var(--st-muted);
	cursor: pointer; transition: transform .12s ease; display: inline-block;
}
.efs-tree-caret.is-open { transform: rotate(90deg); }
.efs-tree-layer-swatch { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.efs-tree-layer-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.efs-tree-layer-count {
	flex-shrink: 0; min-width: 16px; padding: 0 5px; border-radius: 99px;
	background: var(--st-btn-bg); color: var(--st-muted); font-size: .62rem; text-align: center;
}
.efs-tree-objects { list-style: none; margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 1px; }
.efs-tree-obj {
	display: flex; align-items: center; gap: 6px;
	padding: 5px 6px; border-radius: 6px; cursor: pointer;
	font-size: .73rem; color: var(--st-muted);
}
.efs-tree-obj:hover { background: var(--st-item-hover); color: var(--st-text); }
.efs-tree-obj.is-selected { background: var(--st-accent); color: #fff; }
.efs-tree-obj-icon { flex-shrink: 0; width: 14px; text-align: center; opacity: .8; }
.efs-tree-obj-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efs-tree-vis, .efs-tree-del {
	flex-shrink: 0; border: 0; background: transparent; color: inherit;
	font-size: .72rem; padding: 2px 3px; border-radius: 4px; cursor: pointer; opacity: .7;
}
.efs-tree-vis:hover, .efs-tree-del:hover { opacity: 1; background: rgba(0,0,0,.18); }
.efs-tree-empty, .efs-seq-empty, .efs-lib-empty { padding: 16px 4px; color: var(--st-muted); font-size: .78rem; text-align: center; }

/* ---- Library panel (studio.js renderLibraryCategories/Grid) ---- */
.efs-lib-search-row { margin-bottom: 10px; flex-shrink: 0; }
.efs-lib-search-row input[type="search"] {
	width: 100%; padding: 7px 9px; border: 1px solid var(--st-border);
	border-radius: 6px; background: var(--st-btn-bg); color: var(--st-text); font-size: .78rem;
}
.efs-lib-search-row input[type="search"]:focus { outline: none; border-color: var(--st-accent-light); }
.efs-lib-categories { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; flex-shrink: 0; }
.efs-lib-cat-btn {
	padding: 4px 9px; border: 1px solid var(--st-border); border-radius: 99px;
	font-size: .68rem; color: var(--st-muted); cursor: pointer; background: transparent;
}
.efs-lib-cat-btn:hover { color: var(--st-text); border-color: var(--st-accent-light); }
.efs-lib-cat-btn.is-active { background: var(--st-accent); border-color: var(--st-accent); color: #fff; }
.efs-lib-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
	flex: 1; overflow-y: auto; align-content: start; margin-bottom: 10px;
}
.efs-lib-item {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 8px 4px 20px; border: 1px solid var(--st-border); border-radius: 8px;
	background: var(--st-btn-bg); cursor: grab; transition: border-color .15s ease;
}
.efs-lib-item:hover { border-color: var(--st-accent-light); }
.efs-lib-item:hover .efs-lib-actions { opacity: 1; }
.efs-lib-thumb { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; }
.efs-lib-thumb svg { max-width: 100%; max-height: 100%; }
.efs-lib-label { font-size: .6rem; color: var(--st-muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.efs-lib-actions {
	position: absolute; bottom: 3px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px;
	opacity: 0; transition: opacity .12s ease;
}
.efs-lib-btn {
	border: 1px solid var(--st-border); background: var(--st-panel); color: var(--st-text);
	width: 18px; height: 18px; border-radius: 4px; font-size: .62rem; line-height: 1; cursor: pointer;
}
.efs-lib-btn:hover { background: var(--st-accent); border-color: var(--st-accent); color: #fff; }
.efs-lib-btn.efs-lib-del:hover { background: var(--efs-coral); border-color: var(--efs-coral); }
.efs-lib-save-row { display: flex; gap: 6px; margin-bottom: 8px; flex-shrink: 0; }
.efs-lib-save-row input[type="text"] {
	flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--st-border);
	border-radius: 6px; background: var(--st-btn-bg); color: var(--st-text); font-size: .75rem;
}
.efs-lib-save-row button:disabled { opacity: .4; pointer-events: none; }

/* ---- Sequence panel (studio.js renderSequenceList) ---- */
.efs-seq-list { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; margin-bottom: 10px; }
.efs-seq-item {
	display: flex; align-items: center; gap: 7px;
	padding: 6px 7px; border: 1px solid var(--st-border); border-radius: 6px;
	background: var(--st-btn-bg); font-size: .74rem; color: var(--st-text);
}
.efs-seq-index {
	display: grid; place-items: center; width: 19px; height: 19px; flex-shrink: 0;
	border-radius: 5px; background: var(--st-accent); color: #fff; font-size: .65rem; font-weight: 700;
}
.efs-seq-color { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(255,255,255,.25); }
.efs-seq-type { flex-shrink: 0; color: var(--st-muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .03em; }
.efs-seq-id { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--st-muted); font-family: monospace; font-size: .68rem; }
.efs-seq-btn {
	flex-shrink: 0; border: 1px solid var(--st-border); background: transparent; color: var(--st-muted);
	width: 18px; height: 18px; border-radius: 4px; font-size: .6rem; cursor: pointer;
}
.efs-seq-btn:hover { color: var(--st-text); border-color: var(--st-accent-light); }
.efs-seq-btn:disabled { opacity: .3; pointer-events: none; }

/* ---- Misc property helpers (Phase 9) ---- */
.efs-prop-row2 { display: flex; gap: 6px; margin-top: 6px; }
.efs-prop-row2 .efs-sim-btn { flex: 1; }
.efs-prop-checkbox label { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--st-text); cursor: pointer; }
.efs-text-style-row { display: flex; align-items: center; gap: 4px; margin: 8px 0; flex-wrap: wrap; }
.efs-text-style-row .efs-tbtn[aria-pressed="true"],
.efs-text-style-row .efs-tbtn.is-active { background: var(--st-accent); border-color: var(--st-accent-light); color: #fff; }
.efs-node-hint { font-size: .74rem; color: var(--st-muted); line-height: 1.5; margin: 0 0 10px; }

/* ---- Layers list (studio.js renderLayerList) ---- */
.efs-layer-list { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.efs-layer-item {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 3px;
	width: 100%;
	padding: 7px 6px;
	border: 0;
	border-radius: 7px;
	color: var(--st-text);
	background: transparent;
	text-align: left;
	font-size: .78rem;
	cursor: default;
	transition: background .12s;
}
.efs-layer-item:hover, .efs-layer-item.is-active { background: var(--st-item-hover); }
.efs-layer-swatch {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--efs-coral); flex-shrink: 0;
	box-shadow: 0 0 0 1px rgba(255,255,255,.15);
}
.efs-layer-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; min-width: 60%; }
.efs-layer-rename-input {
	flex: 1; min-width: 0; padding: 2px 5px; border: 1px solid var(--st-accent-light);
	border-radius: 4px; background: var(--st-btn-bg); color: var(--st-text); font-size: .78rem;
}
.efs-layer-btn {
	flex-shrink: 0; border: 0; background: transparent; color: var(--st-muted);
	font-size: .68rem; line-height: 1; padding: 3px 4px; border-radius: 4px; cursor: pointer;
}
.efs-layer-btn:hover { color: var(--st-text); background: rgba(255,255,255,.08); }
.efs-layer-btn:disabled { opacity: .3; pointer-events: none; }
.efs-layer-btn.efs-layer-del:hover { color: var(--efs-coral); background: rgba(217,100,79,.18); }
.efs-layer-add { margin-top: 10px; align-self: flex-start; }
.efs-layer-add-row { display: flex; gap: 6px; margin-top: 10px; flex-shrink: 0; }
.efs-layer-add-row input[type="text"] {
	flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--st-border);
	border-radius: 6px; background: var(--st-btn-bg); color: var(--st-text); font-size: .75rem;
}
.efs-layer-add-row input[type="text"]:focus { outline: none; border-color: var(--st-accent-light); }
.efs-layer-add-row .efs-layer-add { margin-top: 0; align-self: auto; }

/* ---- Canvas area ---- */
.efs-canvas-wrap {
	position: relative;
	overflow: hidden;
	background: var(--st-canvas-bg);
	min-width: 0;
}
.efs-canvas-wrap canvas {
	display: block;
}
.efs-canvas-hint {
	position: absolute;
	left: 14px;
	bottom: 12px;
	color: rgba(170,193,190,.55);
	font-size: .7rem;
	pointer-events: none;
	line-height: 1.4;
}
/* Drop highlight */
.efs-drop-active { outline: 2px dashed var(--st-accent-light); }

/* ---- Properties panel ---- */
.efs-prop-section { margin-bottom: 18px; }
.efs-prop-label {
	margin: 0 0 8px;
	font-size: .66rem;
	color: var(--st-muted);
	text-transform: uppercase;
	letter-spacing: .13em;
}
.efs-prop-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.efs-prop-field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 7px; }
.efs-prop-field label { font-size: .68rem; color: var(--st-muted); }
.efs-prop-field input[type="number"],
.efs-prop-field input[type="text"] {
	height: 28px; padding: 0 7px;
	border: 1px solid var(--st-border);
	border-radius: 5px;
	background: #1e3035;
	color: var(--st-text);
	font-size: .78rem;
	width: 100%;
}
.efs-prop-field input[type="number"]:focus,
.efs-prop-field input[type="text"]:focus {
	outline: none; border-color: var(--st-accent-light);
}
.efs-prop-field input:disabled { opacity: .4; }
.efs-prop-color { flex-direction: row; align-items: center; gap: 8px; }
.efs-prop-color label { flex: 1; }
.efs-prop-color input[type="color"] { width: 36px; height: 28px; border: 1px solid var(--st-border); border-radius: 5px; padding: 2px; background: transparent; cursor: pointer; }
.efs-prop-color input[type="color"]:disabled { opacity: .4; pointer-events: none; }
.efs-prop-row-label { display: flex; justify-content: space-between; font-size: .68rem; color: var(--st-muted); }
.efs-prop-row-label output { color: var(--st-text); }
.efs-prop-field input[type="range"] { width: 100%; accent-color: var(--efs-coral); margin-top: 4px; }
.efs-prop-field input[type="range"]:disabled { opacity: .4; }
.efs-studio-note {
	padding: 10px;
	border: 1px solid #3b5f60;
	border-radius: 8px;
	color: #b8d7d1;
	background: #24484a;
	font-size: .72rem;
	line-height: 1.5;
	margin-top: auto;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1100px) {
	.efs-studio-layout { grid-template-columns: 190px 1fr 210px; }
	.efs-panel-tabs-nav { flex-wrap: wrap; }
	.efs-panel-tabs-nav label { flex: 1 1 calc(50% - 2px); font-size: .63rem; }
	.efs-lib-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
	.efs-hero-grid, .efs-auth-layout  { grid-template-columns: 1fr; gap: 36px; }
	.efs-hero-art    { min-height: 330px; max-width: 550px; }
	.efs-card-grid, .efs-pricing-grid { grid-template-columns: 1fr 1fr; }
	.efs-dashboard-shell { grid-template-columns: 1fr; }
	.efs-sidebar { position: static; display: flex; gap: 5px; overflow-x: auto; }
	.efs-sidebar-label { display: none; }
	.efs-sidebar a { white-space: nowrap; }
	.efs-studio-layout { grid-template-columns: 180px 1fr; }
	.efs-studio-layout .efs-panel-props { display: none; }
	.efs-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
	.efs-container { width: min(100% - 28px, 1160px); }
	.efs-main-nav, .efs-header-actions { display: none; }
	.efs-menu-toggle { display: block; }
	.efs-site-header.is-open .efs-main-nav {
		position: absolute; left: 14px; right: 14px; top: 68px;
		display: grid; gap: 0; padding: 9px;
		border: 1px solid var(--efs-line); border-radius: 12px;
		background: #fffdf9; box-shadow: var(--efs-shadow);
	}
	.efs-site-header.is-open .efs-main-nav a { padding: 11px; }
	.efs-hero { padding: 72px 0 65px; }
	.efs-hero h1 { font-size: clamp(3rem,15vw,5rem); }
	.efs-card-grid, .efs-pricing-grid, .efs-credit-grid, .efs-form-row { grid-template-columns: 1fr; }
	.efs-section-heading, .efs-cta-inner, .efs-footer-bottom { display: block; }
	.efs-section-heading p { margin-top: 14px; }
	.efs-cta .efs-button { margin-top: 24px; }
	.efs-footer-grid { grid-template-columns: 1fr 1fr; }
	.efs-studio-page { padding: 6px; }
	.efs-studio-layout { grid-template-columns: 1fr; }
	.efs-studio-layout .efs-panel-layers { display: none; }
	.efs-studio-layout .efs-panel-props  { display: none; }
	.efs-form-card { padding: 22px; }
}

/* =========================================================================
   PHASE 7 — Preview Panel (StitchSimulator, PreviewPanel, stats completas)
   ========================================================================= */

/* ---- Stats cards grid ---- */
.efs-preview-stats-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-bottom: 12px;
}
.efs-preview-stat-card {
	padding: 9px 10px;
	border: 1px solid var(--st-border);
	border-radius: 8px;
	background: #1e3035;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.efs-preview-stat-card .efs-psc-label {
	font-size: .62rem;
	color: var(--st-muted);
	text-transform: uppercase;
	letter-spacing: .12em;
}
.efs-preview-stat-card .efs-psc-value {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--st-text);
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}
/* Special highlight for current stitch */
.efs-preview-stat-card.is-current .efs-psc-value {
	color: var(--st-accent-light);
}
/* Special for time estimate */
.efs-preview-stat-card.is-time .efs-psc-value {
	font-size: .88rem;
	font-weight: 600;
}
/* Trim indicator — red accent */
.efs-preview-stat-card.is-trim .efs-psc-value {
	color: #e06060;
}

/* ---- Simulation progress bar ---- */
.efs-sim-progress-wrap {
	margin-bottom: 10px;
}
.efs-sim-progress-header {
	display: flex;
	justify-content: space-between;
	font-size: .67rem;
	color: var(--st-muted);
	margin-bottom: 5px;
}
.efs-sim-progress-track {
	height: 5px;
	background: var(--st-btn-bg);
	border-radius: 99px;
	overflow: hidden;
	border: 1px solid var(--st-border);
}
.efs-sim-progress-fill {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--st-accent) 0%, var(--st-accent-light) 100%);
	border-radius: 99px;
	transition: width .08s linear;
	will-change: width;
}

/* ---- Simulation controls ---- */
.efs-sim-controls {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-bottom: 10px;
}
.efs-sim-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 7px;
	border: 1px solid var(--st-btn-border);
	border-radius: 6px;
	background: var(--st-btn-bg);
	color: var(--st-text);
	font-size: .72rem;
	transition: background .12s, border-color .12s;
	flex-shrink: 0;
}
.efs-sim-btn:hover { background: var(--st-item-hover); border-color: var(--st-accent-light); }
.efs-sim-btn:disabled { opacity: .35; pointer-events: none; }
.efs-sim-btn.is-play  { color: #7be0a0; }
.efs-sim-btn.is-pause { color: #f0c060; }
.efs-sim-btn.is-reset { color: var(--st-muted); }
.efs-sim-speed {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 1;
	min-width: 0;
}
.efs-sim-speed label {
	font-size: .62rem;
	color: var(--st-muted);
	white-space: nowrap;
}
.efs-sim-speed input[type="range"] {
	flex: 1;
	accent-color: var(--st-accent-light);
	height: 3px;
	min-width: 0;
}
.efs-sim-speed-val {
	font-size: .68rem;
	color: var(--st-text);
	min-width: 18px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* ---- Mode toggle buttons ---- */
.efs-preview-mode-row {
	display: flex;
	gap: 4px;
	margin-bottom: 10px;
}
.efs-preview-mode-btn {
	flex: 1;
	padding: 6px 0;
	border: 1px solid var(--st-btn-border);
	border-radius: 6px;
	background: var(--st-btn-bg);
	color: var(--st-muted);
	font-size: .72rem;
	text-align: center;
	transition: background .12s, color .12s, border-color .12s;
}
.efs-preview-mode-btn.is-active {
	background: var(--st-accent);
	border-color: var(--st-accent-light);
	color: #fff;
}
.efs-preview-mode-label {
	font-size: .62rem;
	color: var(--st-muted);
	text-align: center;
	margin-bottom: 8px;
}

/* ---- Thread palette ---- */
.efs-preview-palette-section {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--st-border);
}
.efs-preview-palette-title {
	font-size: .62rem;
	color: var(--st-muted);
	text-transform: uppercase;
	letter-spacing: .12em;
	margin: 0 0 7px;
}
.efs-thread-palette {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 130px;
	overflow-y: auto;
}
/* Thread swatch item — Phase 6 base + Phase 7 enhanced */
.efs-thread-swatch {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 4px 6px;
	border-radius: 6px;
	background: #1e3035;
	border: 1px solid var(--st-border);
	font-size: .72rem;
}
.efs-thread-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 1px solid rgba(255,255,255,.18);
	background: var(--efs-coral); /* fallback */
}
.efs-thread-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--st-text);
}
.efs-thread-count {
	font-size: .65rem;
	color: var(--st-muted);
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}
.efs-preview-empty {
	font-size: .75rem;
	color: var(--st-muted);
	text-align: center;
	padding: 10px 0;
	margin: 0;
}

/* ---- Machine speed input ---- */
.efs-machine-speed-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	font-size: .7rem;
	color: var(--st-muted);
}
.efs-machine-speed-row input[type="number"] {
	width: 68px;
	height: 26px;
	padding: 0 6px;
	border: 1px solid var(--st-border);
	border-radius: 5px;
	background: #1e3035;
	color: var(--st-text);
	font-size: .74rem;
}
.efs-machine-speed-row input:focus {
	outline: none;
	border-color: var(--st-accent-light);
}

/* ---- Export summary ---- */
.efs-export-summary {
	margin-top: 8px;
	padding: 8px 10px;
	border: 1px solid var(--st-border);
	border-radius: 7px;
	background: #1e3035;
	font-size: .72rem;
}
.efs-export-summary-row {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 3px 0;
	border-bottom: 1px solid rgba(60,75,80,.5);
	color: var(--st-muted);
}
.efs-export-summary-row:last-child { border-bottom: 0; }
.efs-export-summary-row strong { color: var(--st-text); }

/* ---- Trim indicator (canvas overlay legend) ---- */
.efs-preview-legend {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 8px;
	font-size: .64rem;
	color: var(--st-muted);
}
.efs-legend-item {
	display: flex;
	align-items: center;
	gap: 4px;
}
.efs-legend-dot {
	width: 10px;
	height: 2px;
	border-radius: 1px;
}
.efs-legend-stitch { background: var(--st-accent-light); }
.efs-legend-jump   { background: rgba(160,160,160,.6); border-style: dashed; }
.efs-legend-trim   { background: rgba(220,50,50,.7); }

/* ---- Refresh simulation button ---- */
.efs-sim-refresh-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 9px;
	border: 1px solid var(--st-btn-border);
	border-radius: 6px;
	background: var(--st-btn-bg);
	color: var(--st-muted);
	font-size: .7rem;
	margin-top: 6px;
	width: 100%;
	justify-content: center;
	transition: background .12s, color .12s;
}
.efs-sim-refresh-btn:hover {
	background: var(--st-item-hover);
	color: var(--st-text);
	border-color: var(--st-accent-light);
}

/* ---- Responsive Phase 7 ---- */
@media (max-width: 900px) {
	.efs-preview-stats-grid { grid-template-columns: 1fr 1fr 1fr; }
	.efs-thread-palette      { max-height: 100px; }
}
@media (max-width: 680px) {
	.efs-preview-stats-grid { grid-template-columns: 1fr 1fr; }
}


/* =====================================================================
   Phase 8 — ExportPanel (Machine Bridge)
   ===================================================================== */

/* ---- Panel container ---- */
.efs-export-panel {
  background   : var(--st-sidebar-bg, #1e1e2e);
  border       : 1px solid var(--st-border, #2e2e42);
  border-radius: 10px;
  padding      : 18px 20px;
  display      : flex;
  flex-direction: column;
  gap          : 14px;
  color        : var(--st-text, #e4e4ef);
  font-size    : .875rem;
  max-width    : 440px;
  width        : 100%;
}
.efs-export-panel[hidden] { display: none; }

.efs-export-panel__title {
  font-size  : 1rem;
  font-weight: 600;
  color      : var(--st-accent, #a78bfa);
  margin     : 0 0 4px;
  display    : flex;
  align-items: center;
  gap        : 8px;
}
.efs-export-panel__title svg,
.efs-export-panel__title .icon { width: 18px; height: 18px; opacity: .85; }

/* ---- Plugin status pill ---- */
.efs-export-plugin-status {
  font-size    : .72rem;
  padding      : 3px 10px;
  border-radius: 20px;
  display      : inline-block;
  font-weight  : 500;
  letter-spacing: .02em;
}
.efs-export-plugin-status--hook        { background: #14532d; color: #86efac; }
.efs-export-plugin-status--postmessage { background: #1e3a5f; color: #93c5fd; }
.efs-export-plugin-status--ajax        { background: #292524; color: #d4b483; }
.efs-export-plugin-status--none        { background: #3b1f1f; color: #fca5a5; }

/* ---- Format selector chips ---- */
.efs-export-formats {
  display  : flex;
  flex-wrap: wrap;
  gap      : 6px;
}
.efs-export-format-card {
  padding      : 7px 14px;
  border-radius: 8px;
  background   : var(--st-item-bg, #2a2a3c);
  border       : 2px solid transparent;
  cursor       : pointer;
  display      : flex;
  flex-direction: column;
  align-items  : center;
  gap          : 2px;
  transition   : border-color .14s, background .14s;
  min-width    : 60px;
  user-select  : none;
}
.efs-export-format-card:hover {
  background  : var(--st-item-hover, #33334a);
  border-color: var(--st-accent-light, #c4b5fd);
}
.efs-export-format-card.is-active {
  border-color: var(--st-accent, #a78bfa);
  background  : color-mix(in srgb, var(--st-accent, #a78bfa) 15%, transparent);
}
.efs-export-format-card[aria-pressed="true"] {
  border-color: var(--st-accent, #a78bfa);
}
.efs-export-format-card__label {
  font-weight: 700;
  font-size  : .9rem;
  color      : var(--st-text, #e4e4ef);
}
.efs-export-format-card__desc {
  font-size: .65rem;
  color    : var(--st-text-dim, #888);
  white-space: nowrap;
}

/* ---- Validation error list ---- */
.efs-export-error-list {
  list-style: none;
  margin    : 0;
  padding   : 0;
  display   : flex;
  flex-direction: column;
  gap       : 4px;
}
.efs-export-error-item {
  background   : #3b1f1f;
  border-left  : 3px solid #ef4444;
  padding      : 5px 10px;
  border-radius: 4px;
  font-size    : .79rem;
  color        : #fca5a5;
  line-height  : 1.4;
}
.efs-export-ok {
  color      : #86efac;
  font-size  : .82rem;
  font-weight: 500;
  margin     : 0;
}

/* ---- Summary blocks ---- */
.efs-export-summary-block,
.efs-export-sim-block {
  display         : grid;
  grid-template-columns: repeat(3, 1fr);
  gap             : 8px;
}
.efs-export-stat {
  background   : var(--st-item-bg, #2a2a3c);
  border-radius: 8px;
  padding      : 8px 10px;
  display      : flex;
  flex-direction: column;
  align-items  : center;
  gap          : 2px;
}
.efs-export-stat__val {
  font-size  : 1.1rem;
  font-weight: 700;
  color      : var(--st-accent, #a78bfa);
}
.efs-export-stat__lbl {
  font-size : .65rem;
  color     : var(--st-text-dim, #888);
  text-align: center;
}

/* ---- Progress bar ---- */
.efs-export-progress-wrap {
  background   : var(--st-item-bg, #2a2a3c);
  border-radius: 6px;
  height       : 6px;
  overflow     : hidden;
}
.efs-export-progress-bar {
  height          : 100%;
  width           : 0%;
  background      : var(--st-accent, #a78bfa);
  border-radius   : 6px;
  transition      : width .35s ease;
  aria-valuemin   : "0";
  aria-valuemax   : "100";
  aria-valuenow   : "0";
}

/* ---- Status text ---- */
.efs-export-status {
  font-size  : .8rem;
  font-weight: 500;
  padding    : 5px 10px;
  border-radius: 5px;
  transition : background .2s, color .2s;
}
.efs-export-status--info    { background: #1e293b; color: #93c5fd; }
.efs-export-status--success { background: #14532d; color: #86efac; }
.efs-export-status--error   { background: #3b1f1f; color: #fca5a5; }
.efs-export-status--warning { background: #422006; color: #fde68a; }

/* ---- Action buttons ---- */
.efs-export-actions {
  display: flex;
  gap    : 8px;
  flex-wrap: wrap;
}
.efs-export-btn {
  padding      : 8px 18px;
  border-radius: 8px;
  border       : none;
  font-size    : .85rem;
  font-weight  : 600;
  cursor       : pointer;
  transition   : background .13s, opacity .13s;
  display      : flex;
  align-items  : center;
  gap          : 6px;
}
.efs-export-btn:disabled { opacity: .45; cursor: not-allowed; }
.efs-export-btn--primary {
  background: var(--st-accent, #a78bfa);
  color     : #fff;
}
.efs-export-btn--primary:hover:not(:disabled) {
  background: var(--st-accent-light, #c4b5fd);
  color     : #1e1e2e;
}
.efs-export-btn--secondary {
  background: var(--st-item-bg, #2a2a3c);
  color     : var(--st-text, #e4e4ef);
  border    : 1px solid var(--st-border, #2e2e42);
}
.efs-export-btn--secondary:hover:not(:disabled) {
  background  : var(--st-item-hover, #33334a);
  border-color: var(--st-accent-light, #c4b5fd);
}
.efs-export-btn--ghost {
  background: transparent;
  color     : var(--st-text-dim, #888);
  border    : 1px dashed var(--st-border, #2e2e42);
}
.efs-export-btn--ghost:hover:not(:disabled) {
  color       : var(--st-text, #e4e4ef);
  border-color: var(--st-border, #2e2e42);
}

/* ---- Spinner ---- */
.efs-export-spinner {
  display    : inline-block;
  width      : 14px;
  height     : 14px;
  border     : 2px solid rgba(255,255,255,.3);
  border-top : 2px solid #fff;
  border-radius: 50%;
  animation  : efs-spin .7s linear infinite;
  flex-shrink: 0;
}
.efs-export-spinner[hidden] { display: none; }

/* ---- History log ---- */
.efs-export-history-title {
  font-size  : .75rem;
  font-weight: 600;
  color      : var(--st-text-dim, #888);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.efs-export-history-list {
  display       : flex;
  flex-direction: column;
  gap           : 4px;
  max-height    : 180px;
  overflow-y    : auto;
  padding-right : 2px;
}
.efs-export-history-item {
  display      : grid;
  grid-template-columns: 18px 40px 80px 1fr auto;
  gap          : 6px;
  align-items  : center;
  font-size    : .73rem;
  padding      : 5px 8px;
  border-radius: 6px;
  background   : var(--st-item-bg, #2a2a3c);
}
.efs-export-history-item.is-ok  { border-left: 2px solid #4ade80; }
.efs-export-history-item.is-err { border-left: 2px solid #f87171; }
.efs-export-hist-icon   { font-size: .9rem; }
.efs-export-hist-format { font-weight: 700; color: var(--st-accent, #a78bfa); }
.efs-export-hist-method { color: var(--st-text-dim, #888); font-size: .67rem; }
.efs-export-hist-msg    { color: var(--st-text, #e4e4ef); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efs-export-hist-time   { color: var(--st-text-dim, #888); font-size: .67rem; white-space: nowrap; }
.efs-export-history-empty {
  font-size : .79rem;
  color     : var(--st-text-dim, #888);
  margin    : 0;
  text-align: center;
  padding   : 8px;
}

/* ---- Method label / format desc ---- */
.efs-export-method-row {
  display    : flex;
  align-items: center;
  gap        : 8px;
  font-size  : .75rem;
  color      : var(--st-text-dim, #888);
}
.efs-export-method-badge {
  background   : var(--st-item-bg, #2a2a3c);
  border       : 1px solid var(--st-border, #2e2e42);
  padding      : 2px 8px;
  border-radius: 4px;
  font-family  : monospace;
  font-size    : .7rem;
  color        : var(--st-text, #e4e4ef);
}
.efs-export-format-desc {
  font-size  : .75rem;
  color      : var(--st-text-dim, #888);
  font-style : italic;
}

/* ---- Responsive Phase 8 ---- */
@media (max-width: 680px) {
  .efs-export-formats           { flex-direction: row; flex-wrap: wrap; }
  .efs-export-format-card       { flex: 1 1 calc(33% - 8px); min-width: 56px; }
  .efs-export-summary-block,
  .efs-export-sim-block         { grid-template-columns: 1fr 1fr; }
  .efs-export-history-item      { grid-template-columns: 18px 36px 1fr auto; }
  .efs-export-hist-method       { display: none; }
}

/* =========================================================================
   NOTE: Toast notifications, loading overlay, session-recovery bar and the
   keyboard shortcuts dialog are intentionally NOT styled here — they are
   injected at runtime by StatusManager.js (_injectStyles) and
   KeyboardManager.js, which already ship a complete, self-contained
   stylesheet scoped to those components. Duplicating the rules here would
   create maintenance drift and specificity conflicts.
   ========================================================================= */
