

#explorer-view .page.explorer-page {
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding: 10px;
	max-width: none;
}

.explorer-layout {
	display: flex;
	flex: 1;
	min-height: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}

.explorer-fm-sidebar {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 200px;
	padding: 12px 8px;
	background: var(--surface-2);
	border-right: 1px solid var(--border);
	overflow-y: auto;
}

.explorer-fm-sidebar-group {
	padding: 10px 10px 4px;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-faint);
}

.explorer-fm-sidebar-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 10px;
	border-radius: var(--radius-sm);
	font-size: 0.86rem;
	color: var(--text-dim);
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.explorer-fm-sidebar-item svg {
	flex-shrink: 0;
	opacity: 0.85;
}

.explorer-fm-sidebar-item:hover {
	background: var(--surface-3);
	color: var(--text);
}

.explorer-fm-sidebar-item.active {
	background: var(--accent-soft);
	color: var(--text);
}

.explorer-fm-sidebar-item.active svg {
	color: var(--accent);
}

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

.explorer-toolbar {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 10px;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
}

.explorer-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex-shrink: 0;
	color: var(--text-dim);
	background: none;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.explorer-btn:hover {
	background: var(--surface-3);
	color: var(--text);
}

.explorer-breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2px;
	margin-left: 8px;
	min-width: 0;
	overflow: hidden;
}

.explorer-crumb {
	padding: 3px 7px;
	font-size: 0.82rem;
	font-family: var(--font-mono);
	color: var(--text-dim);
	background: none;
	border: none;
	border-radius: var(--radius-xs);
	cursor: pointer;
	white-space: nowrap;
}

.explorer-crumb:hover {
	background: var(--surface-3);
	color: var(--text);
}

.explorer-crumb:last-child {
	color: var(--text);
	font-weight: 600;
}

.explorer-crumb-sep {
	color: var(--text-faint);
	font-size: 0.8rem;
}

.explorer-files {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 14px;
}

.explorer-files:not(.list-view) {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 4px;
	align-content: start;
}

.explorer-files.list-view {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.explorer-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--text-faint);
	font-size: 0.88rem;
}

.explorer-file-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 6px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: default;
	user-select: none;
	outline: none;
}

.explorer-file-item:hover {
	background: var(--surface-2);
}

.explorer-file-item.selected {
	background: var(--accent-soft);
	border-color: var(--accent-line);
}

.explorer-file-item .explorer-file-icon {
	display: flex;
	color: var(--text-dim);
}

.explorer-file-item.selected .explorer-file-icon {
	color: var(--accent);
}

.explorer-file-item .explorer-file-name {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.78rem;
	color: var(--text);
	text-align: center;
}

.explorer-file-item.list-view {
	flex-direction: row;
	align-items: center;
	gap: 10px;
	padding: 6px 10px;
	width: 100%;
}

.explorer-file-item.list-view .explorer-file-icon svg {
	width: 20px;
	height: 20px;
}

.explorer-file-item.list-view .explorer-file-name {
	flex: 1;
	text-align: left;
}

.explorer-file-meta {
	flex-shrink: 0;
	width: 80px;
	font-size: 0.76rem;
	color: var(--text-faint);
	text-align: right;
}

.explorer-file-date {
	width: 120px;
}

.explorer-rename-input {
	width: 100%;
	max-width: 140px;
	padding: 2px 4px;
	font: inherit;
	font-size: 0.78rem;
	text-align: center;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--accent);
	border-radius: var(--radius-xs);
	outline: none;
}

.explorer-file-item.list-view .explorer-rename-input {
	max-width: none;
	text-align: left;
}

.explorer-ctx-menu {
	position: fixed;
	z-index: 4000;
	display: flex;
	flex-direction: column;
	min-width: 180px;
	padding: 6px;
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
}

.explorer-ctx-item {
	display: flex;
	align-items: center;
	padding: 7px 10px;
	font-size: 0.84rem;
	color: var(--text);
	background: none;
	border: none;
	border-radius: var(--radius-xs);
	text-align: left;
	cursor: pointer;
}

.explorer-ctx-item:hover {
	background: var(--surface-3);
}

.explorer-ctx-item.danger {
	color: var(--danger);
}

.explorer-ctx-item.disabled,
.explorer-ctx-item:disabled {
	color: var(--text-faint);
	cursor: default;
	pointer-events: none;
}

.explorer-ctx-sep {
	height: 1px;
	margin: 5px 4px;
	background: var(--border);
}

.explorer-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 4100;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
}

.explorer-modal {
	width: min(380px, 90vw);
	padding: 18px;
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}

.explorer-modal-title {
	margin-bottom: 12px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--text);
}

.explorer-modal-body {
	margin-bottom: 14px;
	font-size: 0.84rem;
	color: var(--text-dim);
	max-height: 160px;
	overflow-y: auto;
}

.explorer-prop-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 5px 0;
	border-bottom: 1px solid var(--border);
	font-size: 0.82rem;
}

.explorer-prop-row span:first-child {
	color: var(--text-faint);
}

.explorer-prop-row span:last-child {
	color: var(--text);
	text-align: right;
	overflow-wrap: anywhere;
}

.explorer-modal-input {
	width: 100%;
	padding: 9px 11px;
	margin-bottom: 14px;
	font: inherit;
	font-size: 0.88rem;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	outline: none;
}

.explorer-modal-input:focus {
	border-color: var(--accent);
}

.explorer-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.explorer-btn-ghost,
.explorer-btn-primary,
.explorer-btn-danger {
	padding: 8px 16px;
	font: inherit;
	font-size: 0.84rem;
	font-weight: 500;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: opacity var(--ease), background var(--ease);
}

.explorer-btn-ghost {
	color: var(--text-dim);
	background: var(--surface-3);
}

.explorer-btn-ghost:hover {
	color: var(--text);
}

.explorer-btn-primary {
	color: var(--accent-contrast);
	background: var(--accent);
}

.explorer-btn-primary:hover {
	background: var(--accent-strong);
}

.explorer-btn-danger {
	color: #fff;
	background: var(--danger);
}

.explorer-btn-danger:hover {
	opacity: 0.88;
}

.explorer-toast {
	position: fixed;
	left: 50%;
	bottom: 30px;
	z-index: 4200;
	padding: 9px 16px;
	font-size: 0.82rem;
	color: var(--text);
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
	opacity: 0;
	transform: translate(-50%, 8px);
	transition: opacity 0.18s ease, transform 0.18s ease;
	pointer-events: none;
}

.explorer-toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}
