/* ==========================================================================
   LP Platform — interfata de administrare
   ========================================================================== */

:root {
	--bg:            #f6f7f9;
	--surface:       #ffffff;
	--surface-2:     #fafbfc;
	--border:        #e3e6ea;
	--border-strong: #d0d5dd;
	--text:          #1b1f24;
	--text-muted:    #667085;
	--text-subtle:   #98a2b3;

	--accent:        #2563eb;
	--accent-hover:  #1d4ed8;
	--accent-soft:   #eff4ff;

	--success:       #12b76a;
	--success-soft:  #ecfdf3;
	--warning:       #f79009;
	--warning-soft:  #fffaeb;
	--danger:        #d92d20;
	--danger-soft:   #fef3f2;

	--radius:        10px;
	--radius-sm:     7px;
	--shadow-sm:     0 1px 2px rgba(16,24,40,.05);
	--shadow:        0 1px 3px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.04);
	--shadow-lg:     0 12px 40px rgba(16,24,40,.12);

	--sidebar-w:     236px;
	--font:          system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	--mono:          ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg:            #0f1115;
		--surface:       #171a21;
		--surface-2:     #1b1f27;
		--border:        #262b34;
		--border-strong: #343a45;
		--text:          #e6e8eb;
		--text-muted:    #98a2b3;
		--text-subtle:   #6b7480;

		--accent:        #3b82f6;
		--accent-hover:  #60a5fa;
		--accent-soft:   #17233d;

		--success-soft:  #0b2e1f;
		--warning-soft:  #2b1f08;
		--danger-soft:   #2d1512;

		--shadow-sm:     none;
		--shadow:        0 1px 3px rgba(0,0,0,.4);
		--shadow-lg:     0 16px 48px rgba(0,0,0,.5);
	}
}

:root[data-theme="dark"] {
	--bg:            #0f1115;
	--surface:       #171a21;
	--surface-2:     #1b1f27;
	--border:        #262b34;
	--border-strong: #343a45;
	--text:          #e6e8eb;
	--text-muted:    #98a2b3;
	--text-subtle:   #6b7480;
	--accent:        #3b82f6;
	--accent-hover:  #60a5fa;
	--accent-soft:   #17233d;
	--success-soft:  #0b2e1f;
	--warning-soft:  #2b1f08;
	--danger-soft:   #2d1512;
	--shadow-sm:     none;
	--shadow:        0 1px 3px rgba(0,0,0,.4);
	--shadow-lg:     0 16px 48px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 21px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

/* ---------- Autentificare ---------------------------------------------- */

.auth {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 24px;
}

.auth-card {
	width: 100%;
	max-width: 388px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 36px 32px;
	box-shadow: var(--shadow);
}

.auth-logo {
	width: 42px; height: 42px;
	border-radius: 11px;
	background: var(--text);
	color: var(--surface);
	display: grid; place-items: center;
	font-weight: 700; font-size: 17px;
	margin-bottom: 20px;
}

.auth h1 { font-size: 20px; margin-bottom: 4px; }
.auth .sub { color: var(--text-muted); margin: 0 0 28px; font-size: 14px; }

/* ---------- Formulare --------------------------------------------------- */

.field { margin-bottom: 16px; }

.field label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px;
	color: var(--text);
}

.field .hint {
	display: block;
	font-size: 12px;
	color: var(--text-muted);
	margin-top: 5px;
	font-weight: 400;
}

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=search], input[type=date], select, textarea {
	width: 100%;
	padding: 9px 12px;
	font: inherit;
	font-size: 14px;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	transition: border-color .12s, box-shadow .12s;
	appearance: none;
}

textarea { resize: vertical; min-height: 84px; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

input::placeholder, textarea::placeholder { color: var(--text-subtle); }

input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; }

.checkbox {
	display: flex; align-items: flex-start; gap: 9px;
	font-size: 14px; cursor: pointer;
}
.checkbox input { margin-top: 2px; flex-shrink: 0; }

.field-error { border-color: var(--danger) !important; }
.error-text { color: var(--danger); font-size: 12px; margin-top: 5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

@media (max-width: 720px) {
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Butoane ----------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 16px;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
	white-space: nowrap;
	transition: background .12s, border-color .12s, opacity .12s;
	text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
	background: var(--surface);
	color: var(--text);
	border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 13px; }

.btn:disabled, .btn[aria-busy="true"] { opacity: .6; cursor: not-allowed; }

/* ---------- Alerte ------------------------------------------------------ */

.alert {
	padding: 11px 14px;
	border-radius: var(--radius-sm);
	font-size: 13.5px;
	margin-bottom: 16px;
	border: 1px solid transparent;
	display: flex;
	gap: 9px;
	align-items: flex-start;
}
.alert-error   { background: var(--danger-soft);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info    { background: var(--accent-soft);  color: var(--accent);  border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- Etichete de stare ------------------------------------------- */

.badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.6;
	white-space: nowrap;
}
.badge-neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger); }
.badge-info    { background: var(--accent-soft);  color: var(--accent); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dot-pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
	.dot-pulse { animation: none; }
	* { transition: none !important; }
}

/* ==========================================================================
   Structura aplicatiei
   ========================================================================== */

.app { display: flex; min-height: 100vh; }

/* ---------- Bara laterala ----------------------------------------------- */

.sidebar {
	width: var(--sidebar-w);
	flex-shrink: 0;
	background: var(--surface);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 18px 16px;
	font-weight: 600;
	font-size: 15px;
	color: var(--text);
	border-bottom: 1px solid var(--border);
}
.sidebar-brand:hover { text-decoration: none; }

.sidebar-brand .mark {
	width: 28px; height: 28px;
	border-radius: 7px;
	background: var(--text);
	color: var(--surface);
	display: grid; place-items: center;
	font-size: 12px; font-weight: 700;
	flex-shrink: 0;
}

.nav { padding: 12px 10px; flex: 1; }

.nav-group-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--text-subtle);
	padding: 14px 8px 6px;
}

.nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 450;
	margin-bottom: 1px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.nav a .icon { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav a .count {
	margin-left: auto;
	font-size: 11.5px;
	font-weight: 600;
	background: var(--surface-2);
	border: 1px solid var(--border);
	color: var(--text-muted);
	padding: 0 6px;
	border-radius: 20px;
}
.nav a.active .count { background: var(--accent); border-color: var(--accent); color: #fff; }

.sidebar-footer {
	border-top: 1px solid var(--border);
	padding: 12px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}
.avatar {
	width: 30px; height: 30px; border-radius: 50%;
	background: var(--accent-soft); color: var(--accent);
	display: grid; place-items: center;
	font-weight: 600; font-size: 12px; flex-shrink: 0;
}
.sidebar-footer .who { min-width: 0; flex: 1; }
.sidebar-footer .who strong { display: block; font-weight: 500; font-size: 13px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .who span { color: var(--text-subtle); font-size: 12px; }

/* ---------- Continut ----------------------------------------------------- */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 28px;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
	position: sticky; top: 0; z-index: 20;
}
.topbar .titles { flex: 1; min-width: 0; }
.topbar .titles p { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }
.topbar .actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.content { padding: 24px 28px 64px; flex: 1; }
.content > * + * { margin-top: 20px; }

.breadcrumb { display: flex; gap: 6px; font-size: 13px; color: var(--text-subtle); margin-bottom: 3px; }
.breadcrumb a { color: var(--text-muted); }

/* ---------- Carduri ------------------------------------------------------ */

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}
.card-header {
	padding: 14px 18px;
	border-bottom: 1px solid var(--border);
	display: flex; align-items: center; gap: 12px;
}
.card-header h2 { flex: 1; }
.card-header .sub { color: var(--text-muted); font-size: 13px; margin: 2px 0 0; font-weight: 400; }
.card-body { padding: 18px; }
.card-footer {
	padding: 14px 18px;
	border-top: 1px solid var(--border);
	background: var(--surface-2);
	border-radius: 0 0 var(--radius) var(--radius);
	display: flex; gap: 8px; align-items: center;
}

/* ---------- Tabele ------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }

table.data th {
	text-align: left;
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--text-subtle);
	padding: 10px 14px;
	border-bottom: 1px solid var(--border);
	background: var(--surface-2);
	white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.actions { text-align: right; white-space: nowrap; }

.cell-title { font-weight: 500; color: var(--text); display: block; }
.cell-sub { color: var(--text-subtle); font-size: 12.5px; }

/* ---------- Stat tiles --------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }

.stat {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 18px;
}
.stat .label {
	font-size: 12px; color: var(--text-muted); font-weight: 500;
	text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.stat .value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .delta { font-size: 12.5px; margin-top: 5px; color: var(--text-muted); }
.stat .delta.up { color: var(--success); }
.stat .delta.down { color: var(--danger); }

/* ---------- Stare goala -------------------------------------------------- */

.empty { text-align: center; padding: 56px 24px; }
.empty .glyph { font-size: 34px; margin-bottom: 12px; opacity: .45; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--text-muted); max-width: 400px; margin: 0 auto 20px; }

/* ---------- Taburi ------------------------------------------------------- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a, .tabs button {
	padding: 10px 14px;
	font-size: 14px; font-weight: 500;
	color: var(--text-muted);
	border: 0; background: none; cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	white-space: nowrap;
	font-family: inherit;
}
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs a.active, .tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Diverse ------------------------------------------------------ */

/* ---------- Bara de filtre ----------------------------------------------
   Campurile de formular sunt latime 100% implicit, ceea ce le-ar impinge pe
   randuri separate intr-un container flex. Aici le lasam sa-si ia latimea din
   continut, iar cautarea preia spatiul ramas.
   ------------------------------------------------------------------------ */

.toolbar {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	row-gap: 10px;
}
.toolbar .spacer { flex: 1; }

.toolbar input,
.toolbar select { width: auto; }

.toolbar input[type=search] {
	flex: 1 1 200px;
	min-width: 170px;
	max-width: 340px;
}

.toolbar select { min-width: 148px; }
.toolbar input[type=date] { min-width: 146px; }

/* Butoanele stau lipite si impinse la dreapta, separat de campuri. */
.toolbar .toolbar-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-left: auto;
	flex-shrink: 0;
}

@media (max-width: 640px) {
	.toolbar input[type=search] { flex-basis: 100%; max-width: none; }
	.toolbar select, .toolbar input[type=date] { flex: 1 1 140px; min-width: 0; }
	.toolbar .toolbar-actions { margin-left: 0; width: 100%; }
	.toolbar .toolbar-actions .btn { flex: 1; }
}

.pagination { display: flex; gap: 4px; justify-content: center; padding: 16px; }
.pagination a, .pagination span {
	padding: 6px 11px; border-radius: var(--radius-sm); font-size: 13.5px;
	border: 1px solid var(--border); color: var(--text-muted); background: var(--surface);
}
.pagination a:hover { background: var(--surface-2); text-decoration: none; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

code, kbd, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-2); padding: 1.5px 5px; border-radius: 4px; border: 1px solid var(--border); }

.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.flex { display: flex; align-items: center; gap: 8px; }
.mt-0 { margin-top: 0; }

hr.sep { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 900px) {
	.sidebar {
		position: fixed; z-index: 40; left: 0; top: 0;
		transform: translateX(-100%); transition: transform .2s;
		box-shadow: var(--shadow-lg);
	}
	.sidebar.open { transform: none; }
	.content { padding: 16px; }
	.topbar { padding: 12px 16px; }
	.nav-toggle { display: inline-flex !important; }
	.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 39; }
}
.nav-toggle { display: none; }

/* ==========================================================================
   Editorul de variante
   ========================================================================== */

.editor-shell {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 74px);
	border-top: 1px solid var(--border);
}

.editor-pane { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.pane-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
	min-height: 46px;
	flex-shrink: 0;
}
.pane-bar .spacer { flex: 1; }

.code-tabs { display: flex; gap: 2px; }
.code-tabs button {
	padding: 5px 12px;
	font-size: 13px; font-weight: 500;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: none; color: var(--text-muted);
	cursor: pointer; font-family: inherit;
}
.code-tabs button:hover { background: var(--surface-2); color: var(--text); }
.code-tabs button.active { background: var(--accent-soft); color: var(--accent); }
.code-tabs button .size { font-size: 11px; opacity: .65; margin-left: 4px; }

.editor-body { flex: 1; position: relative; overflow: hidden; }
.editor-body .CodeMirror {
	height: 100%;
	font-family: var(--mono);
	font-size: 13px;
	line-height: 1.6;
}

/* ---------- Panoul de verificare a formularului ------------------------- */

.check-panel {
	border-top: 1px solid var(--border);
	background: var(--surface);
	max-height: 200px;
	overflow-y: auto;
	flex-shrink: 0;
	font-size: 13px;
}
.check-panel .check-head {
	display: flex; align-items: center; gap: 8px;
	padding: 9px 12px;
	position: sticky; top: 0; background: var(--surface);
	border-bottom: 1px solid var(--border);
	cursor: pointer;
	font-weight: 500;
}
.check-list { padding: 8px 12px; margin: 0; list-style: none; }
.check-list li { padding: 4px 0 4px 18px; position: relative; color: var(--text-muted); }
.check-list li::before { position: absolute; left: 0; }
.check-list li.err  { color: var(--danger); }
.check-list li.err::before  { content: '✕'; }
.check-list li.warn { color: var(--warning); }
.check-list li.warn::before { content: '!'; font-weight: 700; }
.check-list li.ok   { color: var(--success); }
.check-list li.ok::before   { content: '✓'; }

/* ---------- Referinta de placeholdere ----------------------------------- */

.ref-drawer {
	position: fixed; right: 0; top: 0; bottom: 0; width: 340px;
	background: var(--surface); border-left: 1px solid var(--border);
	box-shadow: var(--shadow-lg); z-index: 60;
	display: flex; flex-direction: column;
	transform: translateX(100%); transition: transform .2s;
}
.ref-drawer.open { transform: none; }
.ref-drawer .head {
	padding: 14px 16px; border-bottom: 1px solid var(--border);
	display: flex; align-items: center; gap: 10px;
}
.ref-drawer .body { overflow-y: auto; padding: 8px 0 24px; flex: 1; }
.ref-group-label {
	font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
	color: var(--text-subtle); padding: 14px 16px 5px;
}
.ref-item {
	display: block; width: 100%; text-align: left;
	padding: 7px 16px; border: 0; background: none; cursor: pointer;
	font-family: inherit; font-size: 13px; color: var(--text);
}
.ref-item:hover { background: var(--surface-2); }
.ref-item code { background: none; border: 0; padding: 0; color: var(--accent); }
.ref-item .example {
	display: block; color: var(--text-subtle); font-size: 12px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Indicator de salvare ---------------------------------------- */

.save-state { font-size: 12.5px; color: var(--text-subtle); }
.save-state.dirty { color: var(--warning); }
.save-state.saved { color: var(--success); }

/* ---------- Bannerul de rezultat al salvarii ---------------------------- */

.save-banner {
	margin: 0;
	border-radius: 0;
	border-left: 0; border-right: 0; border-top: 0;
	padding: 12px 16px;
	align-items: flex-start;
	flex-shrink: 0;
}
.save-banner ul { margin: 6px 0 0; padding-left: 20px; }
.save-banner li { margin-bottom: 3px; line-height: 1.5; }
.save-banner .banner-body { flex: 1; min-width: 0; }
.save-banner .banner-title { font-weight: 600; }
.save-banner .banner-actions { display: flex; gap: 8px; margin-top: 10px; }
.save-banner code {
	background: color-mix(in srgb, currentColor 12%, transparent);
	border-color: transparent; color: inherit;
}

/* Panoul de verificare creste cand editorul e singur pe ecran */
.check-panel { max-height: 260px; }

@media (max-width: 1100px) {
	.editor-shell { height: auto; }
	.editor-body { min-height: 460px; }
	.ref-drawer { width: 100%; }
}

/* ---------- Biblioteca de imagini ---------------------------------------- */

.media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
	padding: 18px;
}
.media-tile {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--surface-2);
}
.media-tile .thumb {
	aspect-ratio: 4 / 3;
	background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px;
	display: grid; place-items: center; overflow: hidden;
}
.media-tile img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.media-tile .meta { padding: 8px 10px; font-size: 12px; }
.media-tile .meta strong {
	display: block; font-weight: 500; font-size: 12.5px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.media-tile .meta span { color: var(--text-subtle); }
.media-tile .row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.media-tile input[type=text] { padding: 4px 7px; font-size: 12px; }

.dropzone {
	border: 2px dashed var(--border-strong);
	border-radius: var(--radius);
	padding: 32px;
	text-align: center;
	color: var(--text-muted);
	transition: border-color .15s, background .15s;
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
