/* =============================================================================
   ELN Template Preview — iframe stylesheet
   -----------------------------------------------------------------------------
   This stylesheet lives inside an isolated iframe document. No parent theme
   styles reach in, so selectors stay simple and free of !important.
   ============================================================================= */

:root {
	--brand-orange:        #f48220;
	--brand-orange-hover:  #c3681a;
	--brand-orange-soft:   #FDECDC;
	--navy:                rgb(6, 22, 52);
	--ink:                 #1F2330;
	--ink-3:               #6B7280;
	--ink-4:               #9CA3AF;
	--line:                #E3E5EA;
	--bg:                  #F1F3F8;
	--good:                #1F8A5B;
	--good-soft:           #E2F4EB;
	--shadow-sm:           0 1px 2px rgba(15, 23, 42, 0.05);
	--shadow-lg:           0 18px 40px rgba(15, 23, 42, 0.12);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	overflow-x: hidden;
	max-width: 100%;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	color: var(--ink);
	background: transparent;
}

button {
	font-family: inherit;
}

/* -----------------------------------------------------------------------------
   Page container
   ----------------------------------------------------------------------------- */

.eln-preview {
	max-width: 1180px;
	margin: 0 auto;
	padding: 16px;
	overflow-x: hidden;
}

.eln-frame {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 14px rgba(15, 23, 42, 0.06);
	border: 1px solid var(--line);
	background: white;
}

/* Minimal mode (used by the marketing mini preview): the iframe wrapper
   supplies the visual frame, so strip padding and the frame's own
   chrome so the browser-frame goes edge-to-edge inside the iframe. */
body.is-minimal .eln-preview {
	max-width: none;
	margin: 0;
	padding: 0;
}

body.is-minimal .eln-frame {
	border-radius: 0;
	border: 0;
	box-shadow: none;
}

/* Minimal mode: trim internal padding so content reads denser
   (since the mini preview shrinks to a small footprint). */
body.is-minimal .eln-content {
	padding: 14px 18px 20px 22px;
}

body.is-minimal .eln-section {
	padding: 12px 0 8px;
}

body.is-minimal .eln-section__head {
	margin-bottom: 8px;
}

/* -----------------------------------------------------------------------------
   Browser chrome — window controls + URL bar
   ----------------------------------------------------------------------------- */

.eln-browser {
	background: var(--bg);
	border-bottom: 1px solid var(--line);
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.eln-browser__dots {
	display: flex;
	gap: 6px;
}

.eln-browser__dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
}

.eln-browser__dot--red    { background: #FF5F57; }
.eln-browser__dot--yellow { background: #FEBC2E; }
.eln-browser__dot--green  { background: #28C840; }

.eln-browser__url {
	flex: 1;
	background: white;
	border-radius: 7px;
	padding: 5px 12px;
	font-size: 12px;
	color: var(--ink-3);
	border: 1px solid var(--line);
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 520px;
	margin: 0 auto;
}

.eln-browser__lock {
	width: 11px;
	height: 11px;
	stroke: var(--good);
	flex-shrink: 0;
}

.eln-browser__url-path {
	color: var(--ink-4);
}

.eln-browser__spacer {
	width: 50px;
}

/* -----------------------------------------------------------------------------
   ELN top bar
   ----------------------------------------------------------------------------- */

.eln-topbar {
	background: linear-gradient(180deg, #FBFCFE 0%, #FFFFFF 100%);
	border-bottom: 1px solid var(--line);
	padding: 10px 18px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	font-size: 12px;
}

.eln-topbar__brand {
	display: flex;
	align-items: center;
	gap: 8px;
}

.eln-topbar__icon {
	width: 13px;
	height: 13px;
	stroke: var(--brand-orange);
	flex-shrink: 0;
}

.eln-topbar__title {
	font-weight: 600;
	color: var(--ink);
}

.eln-topbar__version {
	font-size: 11px;
	color: var(--ink-3);
	padding: 2px 7px;
	background: var(--bg);
	border-radius: 999px;
}

.eln-topbar__spacer {
	flex: 1;
}

.eln-topbar__highlights {
	border: 1px solid var(--line);
	background: var(--brand-orange-soft);
	color: var(--brand-orange-hover);
	border-radius: 7px;
	padding: 4px 10px;
	font-size: 11.5px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
}

.eln-topbar__highlights svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   Body grid — rail + content
   ----------------------------------------------------------------------------- */

.eln-body {
	background: #F0F0F2;
}

.eln-content {
	padding: 28px 36px 40px 56px;
	min-width: 0;
	overflow-x: hidden;
}

/* -----------------------------------------------------------------------------
   Header — ID + category + status + title
   ----------------------------------------------------------------------------- */

.eln-header__row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.eln-header__id {
	font-size: 18px;
	font-weight: 600;
}

.eln-pill {
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.eln-pill--category               { background: #EEF1F8;          color: #1E3776; }
.eln-pill--status.is-running      { background: #FDF1E0;          color: #B45A0B; }
.eln-pill--status.is-complete     { background: var(--good-soft); color: var(--good); }
.eln-pill--status.is-draft        { background: var(--bg);        color: var(--ink-3); }
.eln-pill--status.is-paused       { background: #E1EBFA;          color: #1E4691; }

.eln-header__title {
	font-size: 28px;
	margin: 0 0 14px;
	font-weight: 400;
	line-height: 1.2;
}

/* -----------------------------------------------------------------------------
   Toolbar
   ----------------------------------------------------------------------------- */

.eln-toolbar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	margin-bottom: 16px;
}

.eln-toolbar__btn {
	width: 30px;
	height: 30px;
	border-radius: 6px;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}

.eln-toolbar__btn svg {
	width: 15px;
	height: 15px;
	stroke: var(--ink);
	flex-shrink: 0;
}

.eln-toolbar__btn.is-active        { background: var(--brand-orange); }
.eln-toolbar__btn.is-active svg    { stroke: white; }
.eln-toolbar__btn.is-lock svg      { stroke: var(--good); }

.eln-toolbar__divider {
	width: 1px;
	height: 18px;
	background: var(--line);
	margin: 0 6px;
}

.eln-toolbar__spacer {
	flex: 1;
}

.eln-toolbar__stars {
	display: flex;
	gap: 1px;
	margin-right: 6px;
}

.eln-toolbar__stars svg {
	width: 13px;
	height: 13px;
	stroke: var(--brand-orange);
	fill: var(--brand-orange);
	flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   Metadata row — started on + tags + custom id
   ----------------------------------------------------------------------------- */

.eln-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 28px;
	font-size: 13px;
}

.eln-meta__col {
	display: grid;
	gap: 10px;
}

.eln-meta__field {
	display: grid;
	gap: 10px;
	align-items: center;
}

.eln-meta__field--started-on { grid-template-columns: 90px max-content; }
.eln-meta__field--tags       { grid-template-columns: 90px 1fr; }
.eln-meta__field--custom-id  { grid-template-columns: 1fr 220px; }

.eln-meta__label {
	color: var(--ink-3);
	font-size: 12px;
}

.eln-meta__label--right {
	text-align: right;
}

.eln-input {
	width: 100%;
	height: 30px;
	padding: 0 10px;
	font-size: 12.5px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: white;
	color: var(--ink);
	font-family: inherit;
}

.eln-input:focus {
	outline: 2px solid var(--brand-orange-soft);
	outline-offset: -1px;
}

.eln-tags {
	width: 100%;
	padding: 4px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: white;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	min-height: 32px;
}

.eln-tag {
	padding: 3px 9px;
	background: var(--brand-orange-soft);
	color: var(--brand-orange-hover);
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 500;
	white-space: nowrap;
}

.eln-meta__date-control {
	position: relative;
	width: 140px;
}

.eln-meta__date-control .eln-input--date {
	padding-right: 32px;
}

.eln-meta__date-trigger {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	color: var(--ink-3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.12s, background-color 0.12s;
}

.eln-meta__date-trigger:hover {
	color: var(--brand-orange-hover);
	background-color: var(--brand-orange-soft);
}

.eln-meta__date-trigger svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	display: block;
}

.eln-meta__date-native {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
	border: 0;
	padding: 0;
	background: transparent;
}

.eln-meta__custom-id-controls {
	display: flex;
	gap: 6px;
}

.eln-btn-dark {
	height: 30px;
	padding: 0 12px;
	font-size: 12px;
	font-weight: 500;
	color: white;
	background: var(--navy);
	border: 1px solid var(--navy);
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   Section primitive — collapsible wrapper used by every body section
   ----------------------------------------------------------------------------- */

.eln-section {
	border-top: 1px solid var(--line);
	padding: 20px 0 16px;
}

.eln-section__head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	width: 100%;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
}

.eln-section__chevron {
	width: 12px;
	height: 12px;
	stroke: var(--ink);
	flex-shrink: 0;
	transition: transform 0.15s;
}

.eln-section.is-collapsed .eln-section__chevron {
	transform: rotate(-90deg);
}

.eln-section__title {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--ink);
	white-space: nowrap;
}

.eln-section.is-collapsed .eln-section__body {
	display: none;
}

/* -----------------------------------------------------------------------------
   EXTRA FIELDS section
   ----------------------------------------------------------------------------- */

.eln-extra-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.eln-extra-loaded-from {
	margin-left: auto;
	font-size: 11.5px;
	color: var(--ink-3);
}

.eln-extra-loaded-from strong {
	color: var(--brand-orange);
	font-weight: 600;
}

.eln-extra-group {
	margin-bottom: 16px;
}

.eln-extra-group:last-child {
	margin-bottom: 0;
}

.eln-extra-group__label {
	font-size: 11px;
	font-weight: 600;
	color: var(--ink-3);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 8px;
	padding-left: 2px;
}

.eln-extra-group__card {
	background: white;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
}

.eln-extra-row {
	display: grid;
	grid-template-columns: 180px 60px 1fr 24px;
	gap: 14px;
	align-items: center;
	padding: 9px 14px;
	border-top: 1px solid var(--line);
	font-size: 12.5px;
}

.eln-extra-row:first-child {
	border-top: 0;
}

.eln-extra-row__label {
	color: var(--ink);
	font-weight: 500;
}

.eln-extra-row__type {
	font-size: 9.5px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 3px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.eln-extra-row__type.is-text   { background: var(--bg);                color: var(--ink-3); }
.eln-extra-row__type.is-select { background: #EEF1F8;                  color: #1E3776; }
.eln-extra-row__type.is-number { background: var(--brand-orange-soft); color: var(--brand-orange-hover); }
.eln-extra-row__type.is-check  { background: var(--good-soft);         color: var(--good); }

.eln-extra-row__value {
	color: var(--ink);
	font-size: 12.5px;
}

.eln-extra-row__value.is-number {
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.eln-extra-row__unit {
	color: var(--ink-3);
	margin-left: 4px;
}

.eln-extra-row__kebab {
	width: 12px;
	height: 12px;
	stroke: var(--ink-4);
	flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   MAIN TEXT — faux rich-text editor
   ----------------------------------------------------------------------------- */

.eln-editor__menubar {
	background: white;
	border: 1px solid var(--line);
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	padding: 6px 12px;
	font-size: 12px;
	color: var(--ink);
	display: flex;
	gap: 16px;
}

.eln-editor__toolbar {
	background: white;
	border-left: 1px solid var(--line);
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	padding: 6px 10px;
	font-size: 12px;
	color: var(--ink);
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.eln-editor__group {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	padding-right: 6px;
	margin-right: 6px;
	border-right: 1px solid var(--line);
}

.eln-editor__group:last-child {
	border-right: 0;
	padding-right: 0;
	margin-right: 0;
}

.eln-editor__tool {
	min-width: 26px;
	min-height: 26px;
	padding: 4px 5px;
	border-radius: 3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	color: var(--ink);
	transition: background-color 0.12s;
}

.eln-editor__tool:hover {
	background-color: var(--bg);
}

.eln-editor__tool svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
	stroke: none;
	flex-shrink: 0;
	display: block;
}

.eln-editor__tool--split {
	gap: 6px;
	padding-right: 6px;
}

.eln-editor__tool.is-bold       { font-weight: 700; }
.eln-editor__tool.is-italic     { font-style: italic; }
.eln-editor__tool.is-underline  { text-decoration: underline; }
.eln-editor__tool.is-strike     { text-decoration: line-through; }

.eln-editor__tool.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.eln-editor__tool.is-disabled:hover {
	background-color: transparent;
}

.eln-editor__select {
	min-height: 26px;
	padding: 4px 8px;
	font-size: 11.5px;
	color: var(--ink);
	background: transparent;
	border: 0;
	border-radius: 3px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background-color 0.12s;
}

.eln-editor__select:hover {
	background-color: var(--bg);
}

.eln-editor__select--para {
	min-width: 84px;
	justify-content: space-between;
}

.eln-editor__chevron,
.eln-editor__tool svg.eln-editor__chevron {
	width: 9px;
	height: 9px;
	fill: currentColor;
	stroke: none;
	flex-shrink: 0;
	display: block;
}

.eln-editor__body {
	background: white;
	border: 1px solid var(--line);
	border-top: 0;
	padding: 18px 22px;
	min-height: 140px;
	max-height: 360px;
	overflow-y: auto;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--ink);
	overflow-wrap: break-word;
	word-wrap: break-word;
	max-width: 100%;
}

.eln-editor__body p {
	margin: 0 0 12px;
}

.eln-editor__body p:last-child {
	margin-bottom: 0;
}

.eln-editor__body a {
	color: var(--brand-orange);
}

.eln-editor__footer {
	background: white;
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 8px 8px;
	padding: 5px 12px;
	font-size: 10.5px;
	color: var(--ink-3);
	display: flex;
	justify-content: space-between;
}

.eln-editor__footer-tiny {
	color: var(--brand-orange);
	font-weight: 600;
}

.eln-editor__actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 14px 0 4px;
}

.eln-editor__last-saved {
	font-size: 11px;
	color: var(--ink-3);
	text-align: left;
	margin-top: 8px;
}

.eln-btn-primary,
.eln-btn-secondary {
	padding: 8px 22px;
	font-size: 13px;
	font-weight: 500;
	color: white;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
}

.eln-btn-primary   { background: var(--brand-orange); }
.eln-btn-secondary { background: var(--navy); }

/* =============================================================================
   ATTACHED FILES
   ============================================================================= */

.eln-files-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.eln-file-card {
	background: white;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.eln-file-card__icon {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.eln-file-card__icon svg {
	width: 17px;
	height: 17px;
	stroke: currentColor;
}

.eln-file-card__icon.is-pdf  { background: #EEF1F8;                  color: #1E3776; }
.eln-file-card__icon.is-docx { background: #EEF1F8;                  color: #1E3776; }
.eln-file-card__icon.is-csv  { background: var(--brand-orange-soft); color: var(--brand-orange); }
.eln-file-card__icon.is-xlsx { background: var(--good-soft);         color: var(--good); }
.eln-file-card__icon.is-png  { background: var(--bg);                color: var(--ink-3); }

.eln-file-card__meta {
	flex: 1;
	min-width: 0;
}

.eln-file-card__name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.eln-file-card__size {
	font-size: 11px;
	color: var(--ink-3);
}

.eln-file-card__download {
	width: 14px;
	height: 14px;
	stroke: var(--ink-3);
	flex-shrink: 0;
}

/* =============================================================================
   STEPS
   ============================================================================= */

.eln-steps {
	background: white;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
}

.eln-step {
	display: grid;
	grid-template-columns: 32px 22px 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 9px 14px;
	border-top: 1px solid var(--line);
	font-size: 12.5px;
}

.eln-step:first-child {
	border-top: 0;
}

.eln-step__num {
	font-size: 11px;
	color: var(--ink-3);
	font-family: "JetBrains Mono", ui-monospace, monospace;
}

.eln-step__check {
	width: 16px;
	height: 16px;
	border-radius: 4px;
	border: 1.5px solid var(--line);
	background: white;
	display: flex;
	align-items: center;
	justify-content: center;
}

.eln-step.is-complete .eln-step__check {
	background: var(--brand-orange);
	border-color: var(--brand-orange);
}

.eln-step__check svg {
	width: 10px;
	height: 10px;
}

.eln-step__desc {
	color: var(--ink);
}

.eln-step.is-complete .eln-step__desc {
	color: var(--ink-3);
	text-decoration: line-through;
}

.eln-step__meta {
	font-size: 11px;
	color: var(--ink-4);
	margin-top: 2px;
}

.eln-step__time {
	font-size: 10.5px;
	color: var(--ink-3);
	font-family: "JetBrains Mono", ui-monospace, monospace;
}

.eln-steps__add {
	background: white;
	border-radius: 8px;
	padding: 8px 14px;
	border: 1px solid var(--line);
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.eln-steps__add input {
	flex: 1;
	border: 0;
	outline: none;
	font-family: inherit;
	font-size: 12.5px;
	color: var(--ink);
	background: transparent;
}

.eln-btn-primary--sm {
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 500;
}

/* =============================================================================
   SPREADSHEET EDITOR
   ============================================================================= */

.eln-sheet {
	background: white;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow-x: auto;
	max-width: 100%;
}

.eln-sheet__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.eln-sheet__corner,
.eln-sheet__col-letter,
.eln-sheet__row-num {
	background: var(--bg);
	color: var(--ink-3);
	font-size: 10.5px;
	font-weight: 600;
	text-align: center;
	padding: 5px 6px;
	border: 1px solid var(--line);
}

.eln-sheet__corner { width: 32px; }
.eln-sheet__row-num { width: 32px; }

.eln-sheet__cell {
	padding: 6px 10px;
	border: 1px solid var(--line);
	background: white;
	text-align: left;
	white-space: nowrap;
}

.eln-sheet__table tbody tr.is-header-row .eln-sheet__cell {
	font-weight: 600;
	background: #FAFBFD;
}

/* =============================================================================
   LINKS
   ============================================================================= */

.eln-links__group + .eln-links__group {
	margin-top: 14px;
}

.eln-links__subhead {
	font-size: 11px;
	font-weight: 600;
	color: var(--ink);
	letter-spacing: 0.06em;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.eln-links__subhead svg {
	width: 10px;
	height: 10px;
	stroke: var(--ink);
	flex-shrink: 0;
}

.eln-links__table {
	background: white;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
}

.eln-links__row {
	display: grid;
	grid-template-columns: 120px 1fr 140px 60px 24px;
	gap: 12px;
	align-items: center;
	padding: 8px 14px;
	border-top: 1px solid var(--line);
	font-size: 12.5px;
}

.eln-links__row:first-child {
	border-top: 0;
}

.eln-links__ref {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 11px;
	font-weight: 600;
	color: var(--brand-orange);
}

.eln-links__title {
	color: var(--ink);
}

.eln-links__owner {
	color: var(--ink-3);
	font-size: 11.5px;
}

.eln-links__date {
	color: var(--ink-4);
	font-size: 11px;
	font-family: "JetBrains Mono", ui-monospace, monospace;
}

.eln-links__icon {
	width: 12px;
	height: 12px;
	stroke: var(--ink-4);
	flex-shrink: 0;
}

/* =============================================================================
   COMPOUNDS
   ============================================================================= */

.eln-compounds-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.eln-compound-card {
	background: white;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.eln-compound-card__icon {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	background: var(--brand-orange-soft);
	color: var(--brand-orange);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.eln-compound-card__icon svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
}

.eln-compound-card__meta {
	flex: 1;
	min-width: 0;
}

.eln-compound-card__name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink);
}

.eln-compound-card__catalog {
	font-size: 10.5px;
	color: var(--ink-3);
	font-family: "JetBrains Mono", ui-monospace, monospace;
}

.eln-compound-card__stock {
	font-size: 10px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 999px;
	flex-shrink: 0;
}

.eln-compound-card__stock.is-in-stock { background: var(--good-soft);         color: var(--good); }
.eln-compound-card__stock.is-low      { background: var(--brand-orange-soft); color: var(--brand-orange-hover); }
.eln-compound-card__stock.is-out      { background: #FCE3E3;                  color: #B91C1C; }

/* =============================================================================
   STORAGE
   ============================================================================= */

.eln-storage-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.eln-storage-card {
	background: white;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.eln-storage-card__icon {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	background: #EEF1F8;
	color: #1E3776;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.eln-storage-card__icon svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
}

.eln-storage-card__meta {
	flex: 1;
}

.eln-storage-card__name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink);
}

.eln-storage-card__location {
	font-size: 10.5px;
	color: var(--ink-3);
	font-family: "JetBrains Mono", ui-monospace, monospace;
}

.eln-storage-card__count {
	font-size: 11.5px;
	color: var(--ink-3);
}

/* =============================================================================
   PERMISSIONS
   ============================================================================= */

.eln-perms {
	display: grid;
	gap: 8px;
}

.eln-perms__row {
	display: grid;
	grid-template-columns: 120px 36px 1fr;
	gap: 12px;
	align-items: center;
	font-size: 12.5px;
}

.eln-perms__label {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--ink);
}

.eln-perms__label svg {
	width: 13px;
	height: 13px;
	stroke: var(--ink);
	flex-shrink: 0;
}

.eln-perms__add {
	width: 28px;
	height: 28px;
	padding: 0;
	background: white;
	border: 1px solid var(--line);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.eln-perms__add svg {
	width: 12px;
	height: 12px;
	stroke: var(--ink);
}

.eln-perms__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.eln-perm-pill {
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 500;
	white-space: nowrap;
}

.eln-perm-pill.is-person {
	background: var(--brand-orange-soft);
	color: var(--brand-orange-hover);
}

.eln-perm-pill.is-team {
	background: #EEF1F8;
	color: #1E3776;
}

.eln-perm-pill__title {
	opacity: 0.7;
	font-weight: 500;
	margin-left: 2px;
}

/* =============================================================================
   DRAW SOMETHING
   ============================================================================= */

.eln-doodle {
	display: flex;
	gap: 16px;
}

.eln-doodle__canvas {
	width: 800px;
	max-width: 100%;
	height: 600px;
	background: white;
	border-radius: 8px;
	border: 1px solid var(--line);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.eln-doodle__canvas img {
	max-width: 100%;
	max-height: 100%;
	display: block;
}

.eln-doodle__tools {
	flex: 0 0 200px;
	font-size: 13px;
}

.eln-doodle__tools hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 8px 0;
}

.eln-doodle__tool {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.eln-doodle__tool label {
	color: var(--ink);
}

.eln-doodle__tool input[type="color"] {
	width: 36px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: white;
	cursor: pointer;
}

.eln-doodle__tool input[type="range"] {
	flex: 1;
}

.eln-doodle__hint {
	color: var(--ink-3);
	font-size: 12px;
	margin: 0;
}

.eln-doodle__hint kbd {
	display: inline-block;
	padding: 1px 5px;
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 11px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 3px;
	color: var(--ink);
}

.eln-doodle__actions {
	display: flex;
	gap: 8px;
}

.eln-btn-danger {
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 500;
	color: white;
	background: #DC2626;
	border: 1px solid #DC2626;
	border-radius: 6px;
	cursor: pointer;
}

/* =============================================================================
   JSON EDITOR
   ============================================================================= */

.eln-json {
	background: #1F2330;
	color: #E2E8F0;
	border-radius: 8px;
	padding: 14px 18px;
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12.5px;
	line-height: 1.5;
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	overflow-x: hidden;
}

.eln-json code {
	font-family: inherit;
	background: transparent;
	padding: 0;
	color: inherit;
}

.eln-json--empty {
	color: var(--ink-3);
}

/* =============================================================================
   HIGHLIGHTS — overlay with numbered pulse dots + click-to-show tooltip
   ============================================================================= */

@keyframes eln-pulse-dot {
	0%, 80%, 100% {
		box-shadow: 0 2px 8px rgba(244, 130, 32, 0.45);
	}
	87% {
		box-shadow:
			0 4px 14px rgba(244, 130, 32, 0.55),
			0 0 0 14px rgba(244, 130, 32, 0.25);
	}
}

.eln-highlights-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 5;
}

.eln-preview:not(.is-highlights-on) .eln-highlights-overlay {
	display: none;
}

.eln-highlight-dot {
	position: absolute;
	width: 24px;
	height: 24px;
	padding: 0;
	border-radius: 50%;
	background: var(--brand-orange);
	color: white;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 2.5px solid white;
	box-shadow: 0 2px 8px rgba(244, 130, 32, 0.45);
	animation: eln-pulse-dot 5s ease-in-out infinite;
	pointer-events: auto;
	user-select: none;
	font-family: inherit;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.eln-highlight-dot__icon {
	width: 14px;
	height: 14px;
	display: block;
}

.eln-highlight-dot.is-open {
	animation-play-state: paused;
	transform: scale(1.18);
	box-shadow:
		0 8px 24px rgba(244, 130, 32, 0.55),
		0 0 0 6px rgba(6, 22, 52, 0.25);
}

.eln-highlight-tooltip {
	position: absolute;
	min-width: 220px;
	max-width: 300px;
	background: var(--navy);
	border: 0;
	border-radius: 10px;
	box-shadow: 0 18px 40px rgba(6, 22, 52, 0.35);
	padding: 14px 16px;
	z-index: 6;
	pointer-events: auto;
	font-size: 12.5px;
}

.eln-highlight-tooltip__num {
	font-size: 10.5px;
	font-weight: 700;
	color: var(--brand-orange);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.eln-highlight-tooltip__title {
	font-weight: 600;
	color: white;
	margin-bottom: 6px;
	font-size: 13.5px;
	line-height: 1.3;
}

.eln-highlight-tooltip__body {
	color: white;
	line-height: 1.5;
	opacity: 0.85;
}

/* Active state on the "Highlights on/off" button */
.eln-topbar__highlights[aria-pressed="false"] {
	background: var(--bg);
	color: var(--ink-3);
}

/* =============================================================================
   RESPONSIVE — tablet (≤ 1024px)
   ============================================================================= */

@media (max-width: 1024px) {
	.eln-content {
		padding: 24px 24px 36px 48px;
	}

	.eln-files-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.eln-meta__field--custom-id {
		grid-template-columns: 90px 1fr;
	}

	.eln-meta__label--right {
		text-align: left;
	}
}

/* =============================================================================
   RESPONSIVE — mobile (≤ 768px)
   ============================================================================= */

@media (max-width: 768px) {
	.eln-preview {
		padding: 0;
	}

	.eln-frame {
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	}

	.eln-content {
		padding: 20px 14px 28px 40px;
	}

	/* Browser chrome */
	.eln-browser {
		padding: 8px 10px;
		gap: 8px;
	}

	.eln-browser__url {
		max-width: none;
		font-size: 10.5px;
		padding: 4px 8px;
		gap: 5px;
		margin: 0;
	}

	.eln-browser__url-path {
		display: none;
	}

	.eln-browser__spacer {
		display: none;
	}

	/* ELN top bar */
	.eln-topbar {
		padding: 8px 12px;
		gap: 8px;
		font-size: 11.5px;
		flex-wrap: wrap;
	}

	.eln-topbar__version {
		display: none;
	}

	.eln-topbar__highlights {
		padding: 4px 8px;
		font-size: 10.5px;
	}

	/* Header */
	.eln-header__title {
		font-size: 20px;
		margin: 0 0 12px;
	}

	.eln-header__row {
		flex-wrap: wrap;
		gap: 6px;
	}

	/* Toolbar */
	.eln-toolbar {
		flex-wrap: wrap;
		gap: 2px;
		padding: 6px 0;
	}

	.eln-toolbar__btn {
		width: 26px;
		height: 26px;
	}

	.eln-toolbar__btn svg {
		width: 13px;
		height: 13px;
	}

	.eln-toolbar__divider {
		margin: 0 2px;
	}

	.eln-toolbar__stars svg {
		width: 12px;
		height: 12px;
	}

	/* Metadata stacks */
	.eln-meta {
		grid-template-columns: 1fr;
		gap: 10px;
		margin-bottom: 20px;
		font-size: 12.5px;
	}

	.eln-meta__field--custom-id {
		grid-template-columns: 90px 1fr;
	}

	.eln-meta__date-control {
		width: 130px;
	}

	/* Section heads */
	.eln-section {
		padding: 16px 0 12px;
	}

	/* Editor */
	.eln-editor__menubar {
		flex-wrap: wrap;
		gap: 10px;
		padding: 6px 10px;
		font-size: 11px;
	}

	.eln-editor__toolbar {
		padding: 6px 8px;
		gap: 3px;
	}

	.eln-editor__group {
		padding-right: 4px;
		margin-right: 4px;
		gap: 0;
	}

	.eln-editor__tool {
		min-width: 24px;
		min-height: 24px;
		padding: 3px 4px;
	}

	.eln-editor__tool svg {
		width: 15px;
		height: 15px;
	}

	.eln-editor__select {
		min-height: 24px;
		padding: 3px 6px;
		font-size: 11px;
	}

	.eln-editor__select--para {
		min-width: 70px;
	}

	.eln-editor__body {
		padding: 14px 16px;
		max-height: 280px;
		font-size: 13px;
	}

	.eln-editor__actions {
		flex-wrap: wrap;
		gap: 8px;
		margin: 12px 0 4px;
	}

	.eln-editor__actions .eln-btn-primary,
	.eln-editor__actions .eln-btn-secondary {
		padding: 8px 16px;
		font-size: 12.5px;
	}

	/* Extra fields rows — stack value below label/type */
	.eln-extra-row {
		grid-template-columns: 1fr auto 24px;
		grid-template-areas:
			"label type kebab"
			"value value value";
		gap: 4px 10px;
		padding: 10px 12px;
	}

	.eln-extra-row__label { grid-area: label; }
	.eln-extra-row__type  { grid-area: type; }
	.eln-extra-row__value { grid-area: value; font-size: 13px; padding-top: 2px; }
	.eln-extra-row__kebab { grid-area: kebab; }

	/* Extra fields action bar wraps */
	.eln-extra-actions {
		flex-wrap: wrap;
		gap: 6px;
	}

	.eln-extra-loaded-from {
		margin-left: 0;
		width: 100%;
		font-size: 11px;
	}

	/* Files / Compounds / Storage → 1 column */
	.eln-files-grid,
	.eln-compounds-grid,
	.eln-storage-grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	/* Steps */
	.eln-step {
		grid-template-columns: 24px 20px 1fr auto;
		gap: 8px;
		padding: 8px 12px;
		font-size: 12px;
	}

	.eln-step__num { font-size: 10px; }
	.eln-step__time { font-size: 10px; }

	.eln-steps__add {
		padding: 6px 12px;
		gap: 8px;
	}

	/* Links — hide owner+date on small screens */
	.eln-links__row {
		grid-template-columns: 110px 1fr 20px;
		gap: 10px;
		padding: 8px 12px;
		font-size: 12px;
	}

	.eln-links__owner,
	.eln-links__date {
		display: none;
	}

	/* Permissions */
	.eln-perms__row {
		grid-template-columns: 90px 28px 1fr;
		gap: 10px;
		font-size: 12px;
	}

	.eln-perm-pill {
		font-size: 11px;
		padding: 2px 8px;
	}

	/* Draw something — stack tools below canvas */
	.eln-doodle {
		flex-direction: column;
		gap: 12px;
	}

	.eln-doodle__canvas {
		width: 100%;
		height: 320px;
	}

	.eln-doodle__tools {
		flex: 0 0 auto;
		width: 100%;
	}

	/* Highlight dot — slightly tighter on mobile */
	.eln-highlight-dot {
		width: 22px;
		height: 22px;
	}

	.eln-highlight-dot__icon {
		width: 12px;
		height: 12px;
	}

	/* Highlight tooltip */
	.eln-highlight-tooltip {
		min-width: 180px;
		max-width: calc(100vw - 40px);
		padding: 12px 14px;
	}

	.eln-highlight-tooltip__title { font-size: 12.5px; }
	.eln-highlight-tooltip__body  { font-size: 11.5px; }
}

/* =============================================================================
   RESPONSIVE — ultra-small (≤ 480px)
   ============================================================================= */

@media (max-width: 480px) {
	.eln-preview {
		padding: 0;
	}

	.eln-content {
		padding: 16px 10px 24px 32px;
	}

	.eln-header__title {
		font-size: 18px;
	}

	.eln-pill {
		padding: 2px 7px;
		font-size: 10.5px;
	}

	.eln-header__id { font-size: 16px; }

	/* Permissions — stack pills onto their own row */
	.eln-perms__row {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.eln-perms__add {
		display: none;
	}

	/* Steps — drop the row number to save space */
	.eln-step {
		grid-template-columns: 20px 1fr auto;
	}

	.eln-step__num { display: none; }

	/* Links — drop ref ID, keep title only */
	.eln-links__row {
		grid-template-columns: 1fr 20px;
	}

	.eln-links__ref { display: none; }

	/* Editor — squeeze further */
	.eln-editor__menubar {
		gap: 8px;
		font-size: 10.5px;
	}

	.eln-editor__body {
		padding: 12px 14px;
		max-height: 260px;
	}

	/* Browser dots smaller */
	.eln-browser__dot {
		width: 9px;
		height: 9px;
	}

	/* Top-bar — make highlights icon-only on tiny screens */
	.eln-topbar__highlights-label {
		display: none;
	}
}
